mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
* elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
into a BFD section just because SHF_ALLOC is set; require that it not use the normal symbol table. (elf_section_from_bfd_section): Corresponding change.
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||||
|
|
||||||
|
* elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
|
||||||
|
into a BFD section just because SHF_ALLOC is set; require that it
|
||||||
|
not use the normal symbol table.
|
||||||
|
(elf_section_from_bfd_section): Corresponding change.
|
||||||
|
|
||||||
Better indirect and warning symbol handling inspired by Stuart
|
Better indirect and warning symbol handling inspired by Stuart
|
||||||
Quick <stuck@cs.man.ac.uk>.
|
Quick <stuck@cs.man.ac.uk>.
|
||||||
* linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
|
* linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
|
||||||
|
@ -616,13 +616,11 @@ bfd_section_from_shdr (abfd, shindex)
|
|||||||
if (! bfd_section_from_shdr (abfd, hdr->sh_link))
|
if (! bfd_section_from_shdr (abfd, hdr->sh_link))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* If this reloc section does not use the main symbol table,
|
/* If this reloc section does not use the main symbol table we
|
||||||
or if it is in the process image, we don't treat it as a
|
don't treat it as a reloc section. BFD can't adequately
|
||||||
reloc section. BFD can't adequately represent such a
|
represent such a section, so at least for now, we don't
|
||||||
section, so at least for now, we don't try. We just
|
try. We just present it as a normal section. */
|
||||||
present it as a normal section. */
|
if (hdr->sh_link != elf_onesymtab (abfd))
|
||||||
if ((hdr->sh_flags & SHF_ALLOC) != 0
|
|
||||||
|| hdr->sh_link != elf_onesymtab (abfd))
|
|
||||||
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
|
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
|
||||||
|
|
||||||
/* Don't allow REL relocations on a machine that uses RELA and
|
/* Don't allow REL relocations on a machine that uses RELA and
|
||||||
@ -1267,8 +1265,7 @@ elf_fake_sections (abfd, asect, ignore)
|
|||||||
|
|
||||||
/* Assign all ELF section numbers. The dummy first section is handled here
|
/* Assign all ELF section numbers. The dummy first section is handled here
|
||||||
too. The link/info pointers for the standard section types are filled
|
too. The link/info pointers for the standard section types are filled
|
||||||
in here too, while we're at it. (Link pointers for .stab sections are
|
in here too, while we're at it. */
|
||||||
not filled in here.) */
|
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
assign_section_numbers (abfd)
|
assign_section_numbers (abfd)
|
||||||
@ -2581,8 +2578,7 @@ elf_section_from_bfd_section (abfd, asect)
|
|||||||
case SHT_REL:
|
case SHT_REL:
|
||||||
case SHT_RELA:
|
case SHT_RELA:
|
||||||
/* We sometimes map a reloc section to a BFD section. */
|
/* We sometimes map a reloc section to a BFD section. */
|
||||||
if (((hdr->sh_flags & SHF_ALLOC) != 0
|
if (hdr->sh_link != elf_onesymtab (abfd)
|
||||||
|| hdr->sh_link != elf_onesymtab (abfd))
|
|
||||||
&& (asection *) hdr->rawdata == asect)
|
&& (asection *) hdr->rawdata == asect)
|
||||||
return index;
|
return index;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user