extern bool _bfd_elf_create_got_section
(bfd *, struct bfd_link_info *);
extern asection *_bfd_elf_section_for_symbol
- (struct elf_reloc_cookie *, unsigned long, bool);
+ (struct elf_reloc_cookie *, unsigned long);
extern struct elf_link_hash_entry *_bfd_elf_define_linkage_sym
(bfd *, struct bfd_link_info *, asection *, const char *);
extern void _bfd_elf_init_1_index_section
if (r_symndx == STN_UNDEF)
return false;
- text_sec = _bfd_elf_section_for_symbol (cookie, r_symndx, false);
+ text_sec = _bfd_elf_section_for_symbol (cookie, r_symndx);
if (text_sec == NULL)
return false;
asection *
_bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie,
- unsigned long r_symndx,
- bool discard)
+ unsigned long r_symndx)
{
struct elf_link_hash_entry *h;
if (h != NULL)
{
- if ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && discarded_section (h->root.u.def.section))
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
return h->root.u.def.section;
else
return NULL;
}
- /* It's not a relocation against a global symbol,
- but it could be a relocation against a local
- symbol for a discarded section. */
- asection *isec;
- Elf_Internal_Sym *isym;
-
- /* Need to: get the symbol; get the section. */
- isym = &cookie->locsyms[r_symndx];
- isec = bfd_section_from_elf_index (cookie->abfd, isym->st_shndx);
- if (isec != NULL
- && discard ? discarded_section (isec) : 1)
- return isec;
-
- return NULL;
+ Elf_Internal_Sym *isym = &cookie->locsyms[r_symndx];
+ return bfd_section_from_elf_index (cookie->abfd, isym->st_shndx);
}
/* Define a symbol in a dynamic linkage section. */