diff options
author | Alan Modra <amodra@gmail.com> | 2007-03-24 06:49:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-03-24 06:49:03 +0000 |
commit | 34711ca3dd782370e5eeab35b78b2500cf4122f0 (patch) | |
tree | 72bf23c8eb30753534d6322fa17164201f01645d /ld/ldlang.c | |
parent | 4146fd53c038b90fd48e64999ffbb7f98175b758 (diff) | |
download | gdb-34711ca3dd782370e5eeab35b78b2500cf4122f0.zip gdb-34711ca3dd782370e5eeab35b78b2500cf4122f0.tar.gz gdb-34711ca3dd782370e5eeab35b78b2500cf4122f0.tar.bz2 |
ld/
* ldlang.c (lang_insert_orphan): Provide start/stop loadaddr syms
rather than defining unconditionally.
(lang_leave_overlay_section): Likewise.
* ld.texinfo (Overlay Description): Update description and examples
for start/stop syms.
ld/testsuite/
* ld-elf/overlay.d: -u symbols we want to see in the output.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 6a25ea3..b223b58 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1490,8 +1490,9 @@ lang_insert_orphan (asection *s, e_align = exp_unop (ALIGN_K, exp_intop ((bfd_vma) 1 << s->alignment_power)); lang_add_assignment (exp_assop ('=', ".", e_align)); - lang_add_assignment (exp_assop ('=', symname, - exp_nameop (NAME, "."))); + lang_add_assignment (exp_provide (symname, + exp_nameop (NAME, "."), + FALSE)); } } @@ -1521,8 +1522,9 @@ lang_insert_orphan (asection *s, symname = (char *) xmalloc (ps - secname + sizeof "__stop_" + 1); symname[0] = bfd_get_symbol_leading_char (output_bfd); sprintf (symname + (symname[0] != 0), "__stop_%s", secname); - lang_add_assignment (exp_assop ('=', symname, - exp_nameop (NAME, "."))); + lang_add_assignment (exp_provide (symname, + exp_nameop (NAME, "."), + FALSE)); } /* Restore the global list pointer. */ @@ -6436,15 +6438,17 @@ lang_leave_overlay_section (fill_type *fill, buf = xmalloc (strlen (clean) + sizeof "__load_start_"); sprintf (buf, "__load_start_%s", clean); - lang_add_assignment (exp_assop ('=', buf, - exp_nameop (LOADADDR, name))); + lang_add_assignment (exp_provide (buf, + exp_nameop (LOADADDR, name), + FALSE)); buf = xmalloc (strlen (clean) + sizeof "__load_stop_"); sprintf (buf, "__load_stop_%s", clean); - lang_add_assignment (exp_assop ('=', buf, - exp_binop ('+', - exp_nameop (LOADADDR, name), - exp_nameop (SIZEOF, name)))); + lang_add_assignment (exp_provide (buf, + exp_binop ('+', + exp_nameop (LOADADDR, name), + exp_nameop (SIZEOF, name)), + FALSE)); free (clean); } |