mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
Do not place symbols into a discarded .dynsym
Prevents getting an error about dynamic symbols in sections indexed 64K+ when .dynsym is discarded. * elflink.c (elf_link_output_extsym): Do not place symbols into a discarded .dynsym.
This commit is contained in:

committed by
Alan Modra

parent
35dc7e6b77
commit
1c2649ed74
@ -1,3 +1,8 @@
|
|||||||
|
2018-10-09 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
|
||||||
|
|
||||||
|
* elflink.c (elf_link_output_extsym): Do not place symbols into a
|
||||||
|
discarded .dynsym.
|
||||||
|
|
||||||
2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
|
2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/23428
|
PR ld/23428
|
||||||
|
@ -10024,9 +10024,10 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
|
|||||||
/* If this symbol should be put in the .dynsym section, then put it
|
/* If this symbol should be put in the .dynsym section, then put it
|
||||||
there now. We already know the symbol index. We also fill in
|
there now. We already know the symbol index. We also fill in
|
||||||
the entry in the .hash section. */
|
the entry in the .hash section. */
|
||||||
if (elf_hash_table (flinfo->info)->dynsym != NULL
|
if (h->dynindx != -1
|
||||||
&& h->dynindx != -1
|
&& elf_hash_table (flinfo->info)->dynamic_sections_created
|
||||||
&& elf_hash_table (flinfo->info)->dynamic_sections_created)
|
&& elf_hash_table (flinfo->info)->dynsym != NULL
|
||||||
|
&& !discarded_section (elf_hash_table (flinfo->info)->dynsym))
|
||||||
{
|
{
|
||||||
bfd_byte *esym;
|
bfd_byte *esym;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user