* elflink.h (elf_link_add_object_symbols): Calling check_relocs
even if SEC_ALLOC is not set. * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC when deciding whether to copy a reloc into a shared object. (elf_i386_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_check_relocs): Likewise. (elf32_sparc_relocate_section): Likewise. * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a reloc section if it is not set in the source section. * elf32-sparc.c (elf32_sparc_check_relocs): Likewise. * elf.c (bfd_section_from_shdr): Mark a reloc section associated with a SEC_DEBUGGING section as SEC_DEBUGGING. PR 11174.
This commit is contained in:
parent
00a69b895a
commit
80be821d2e
@ -1,3 +1,18 @@
|
||||
Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* elflink.h (elf_link_add_object_symbols): Calling check_relocs
|
||||
even if SEC_ALLOC is not set.
|
||||
* elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
|
||||
when deciding whether to copy a reloc into a shared object.
|
||||
(elf_i386_relocate_section): Likewise.
|
||||
* elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
|
||||
(elf32_sparc_relocate_section): Likewise.
|
||||
* elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
|
||||
reloc section if it is not set in the source section.
|
||||
* elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
|
||||
* elf.c (bfd_section_from_shdr): Mark a reloc section associated
|
||||
with a SEC_DEBUGGING section as SEC_DEBUGGING.
|
||||
|
||||
Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||
|
||||
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
|
||||
|
28
bfd/elf.c
28
bfd/elf.c
@ -576,6 +576,7 @@ _bfd_elf_link_hash_newfunc (entry, table, string)
|
||||
ret->plt_offset = (bfd_vma) -1;
|
||||
ret->linker_section_pointer = (elf_linker_section_pointers_t *)0;
|
||||
ret->type = STT_NOTYPE;
|
||||
ret->other = 0;
|
||||
/* Assume that we have been called by a non-ELF symbol reader.
|
||||
This flag is then reset by the code which reads an ELF input
|
||||
file. This ensures that a symbol created by a non-ELF symbol
|
||||
@ -863,7 +864,19 @@ bfd_section_from_shdr (abfd, shindex)
|
||||
represent such a section, so at least for now, we don't
|
||||
try. We just present it as a normal section. */
|
||||
if (hdr->sh_link != elf_onesymtab (abfd))
|
||||
return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
|
||||
{
|
||||
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
|
||||
return false;
|
||||
if (hdr->bfd_section != NULL
|
||||
&& bfd_section_from_shdr (abfd, hdr->sh_info))
|
||||
{
|
||||
target_sect = bfd_section_from_elf_index (abfd, hdr->sh_info);
|
||||
if (target_sect != NULL
|
||||
&& (target_sect->flags & SEC_DEBUGGING) != 0)
|
||||
hdr->bfd_section->flags |= SEC_DEBUGGING;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (! bfd_section_from_shdr (abfd, hdr->sh_info))
|
||||
return false;
|
||||
@ -2525,8 +2538,11 @@ prep_headers (abfd)
|
||||
i_ehdrp->e_machine = EM_CYGNUS_M32R;
|
||||
break;
|
||||
/* end-sanitize-m32r */
|
||||
case bfd_arch_mn10x00:
|
||||
i_ehdrp->e_machine = EM_CYGNUS_MN10x00;
|
||||
case bfd_arch_mn10200:
|
||||
i_ehdrp->e_machine = EM_CYGNUS_MN10200;
|
||||
break;
|
||||
case bfd_arch_mn10300:
|
||||
i_ehdrp->e_machine = EM_CYGNUS_MN10300;
|
||||
break;
|
||||
/* also note that EM_M32, AT&T WE32100 is unknown to bfd */
|
||||
default:
|
||||
@ -3149,7 +3165,11 @@ swap_out_syms (abfd, sttp)
|
||||
sym.st_info = ELF_ST_INFO (bind, type);
|
||||
}
|
||||
|
||||
sym.st_other = 0;
|
||||
if (type_ptr != NULL)
|
||||
sym.st_other = type_ptr->internal_elf_sym.st_other;
|
||||
else
|
||||
sym.st_other = 0;
|
||||
|
||||
bed->s->swap_symbol_out (abfd, &sym, (PTR) outbound_syms);
|
||||
outbound_syms += bed->s->sizeof_sym;
|
||||
}
|
||||
|
@ -956,12 +956,6 @@ elf_link_add_object_symbols (abfd, info)
|
||||
|| o->reloc_count == 0)
|
||||
continue;
|
||||
|
||||
/* I believe we can ignore the relocs for any section which
|
||||
does not form part of the final process image, such as a
|
||||
debugging section. */
|
||||
if ((o->flags & SEC_ALLOC) == 0)
|
||||
continue;
|
||||
|
||||
internal_relocs = (NAME(_bfd_elf,link_read_relocs)
|
||||
(abfd, o, (PTR) NULL,
|
||||
(Elf_Internal_Rela *) NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user