diff options
author | Alan Modra <amodra@gmail.com> | 2006-06-02 00:32:00 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2006-06-02 00:32:00 +0000 |
commit | f0b5bb34d5c2c7023c5e54789743e398ab5669c0 (patch) | |
tree | ce9ee9b9bbfde2a148a709a914490b1021eda21d /bfd | |
parent | 57078fa5d1382256f1e4bb46f609c448569f94a3 (diff) | |
download | gdb-f0b5bb34d5c2c7023c5e54789743e398ab5669c0.zip gdb-f0b5bb34d5c2c7023c5e54789743e398ab5669c0.tar.gz gdb-f0b5bb34d5c2c7023c5e54789743e398ab5669c0.tar.bz2 |
bfd/
PR ld/2723
* elflink.c (bfd_elf_final_link): Don't output section symbols
for special ELF sections.
ld/testsuite/
Update for removal of some section syms.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elflink.c | 17 |
2 files changed, 16 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 57aa072..7af4235 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2006-06-02 Alan Modra <amodra@bigpond.net.au> + H.J. Lu <hongjiu.lu@intel.com> + + PR ld/2723 + * elflink.c (bfd_elf_final_link): Don't output section symbols + for special ELF sections. + 2006-06-01 Alan Modra <amodra@bigpond.net.au> * stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags diff --git a/bfd/elflink.c b/bfd/elflink.c index df2b7e9..c5b1007 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8125,18 +8125,19 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) elfsym.st_size = 0; elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); elfsym.st_other = 0; + elfsym.st_value = 0; for (i = 1; i < elf_numsections (abfd); i++) { o = bfd_section_from_elf_index (abfd, i); if (o != NULL) - o->target_index = bfd_get_symcount (abfd); - elfsym.st_shndx = i; - if (info->relocatable || o == NULL) - elfsym.st_value = 0; - else - elfsym.st_value = o->vma; - if (! elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL)) - goto error_return; + { + o->target_index = bfd_get_symcount (abfd); + elfsym.st_shndx = i; + if (!info->relocatable) + elfsym.st_value = o->vma; + if (!elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL)) + goto error_return; + } if (i == SHN_LORESERVE - 1) i += SHN_HIRESERVE + 1 - SHN_LORESERVE; } |