aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-06-27 16:35:58 +0100
committerNick Clifton <nickc@redhat.com>2016-06-27 16:35:58 +0100
commit42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2 (patch)
treef0a9def52397f3cb301100dc7770dc8da5e61b55 /ld/lexsup.c
parent95daf21060008545515e94aeba501082e8710cc0 (diff)
downloadgdb-42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2.zip
gdb-42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2.tar.gz
gdb-42b7a39bf6eb2e90fb1b07c2d53d7a93263508d2.tar.bz2
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.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 7f8146c..6d28e91 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -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