Commit 42b7a39b authored by Nick Clifton's avatar Nick Clifton
Browse files

Allow a second -T<section>=<addr> to override a previous version on the same linker command line.

	PR ld/20302
	* lexsup.c (set_segment_start): If resetting the start address of
	a section, remember to generate a new script element as well.
	* testsuite/ld-scripts/pr20302.d: New test.
	* testsuite/ld-scripts/scripts.exp: Run the new test.
parent 95daf210
2016-06-27 Nick Clifton <nickc@redhat.com>
PR ld/20302
* lexsup.c (set_segment_start): If resetting the start address of
a section, remember to generate a new script element as well.
* testsuite/ld-scripts/pr20302.d: New test.
* testsuite/ld-scripts/scripts.exp: Run the new test.
2016-06-24 Alan Modra <amodra@gmail.com>
* testsuite/ld-aarch64/aarch64-elf.exp (aarch64_choose_ilp32_emul):
......
......@@ -1686,6 +1686,7 @@ set_segment_start (const char *section, char *valstr)
if (strcmp (seg->name, name) == 0)
{
seg->value = val;
lang_section_start (section, exp_intop (val), seg);
return;
}
/* There was no existing value so we must create a new segment
......
#ld: -Tdata=0x1000 -Tdata=0x2000 -Tcross2.t
#source: align2a.s
#objdump: -h
#notarget: rx-*-* *-*-aout *-*-netbsd x86_64-*-cygwin *-*-vms
# RX uses non standard section names.
# AOUT and NETBSD have fixed address for the data section.
# x86_64 Cygwin biases all start addresses to be > 2Gb.
# VMS targets need extra libraries.
#...
. \.data[ ]+0+[0-9a-f]+[ ]+0+02000[ ]+0+02000.*
#pass
......@@ -230,3 +230,4 @@ foreach test_script $test_script_list {
}
run_dump_test "align-with-input"
run_dump_test "pr20302"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment