aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-02-21 02:29:11 +0000
committerAlan Modra <amodra@gmail.com>2013-02-21 02:29:11 +0000
commit12bd695738760b28c04dd34b3ff228247ec747c9 (patch)
tree4b6d7393eada7903b839e2d842cbd47da3c863f8 /bfd/elflink.c
parent9f44fbc03496a470cf661d011d9bcdcf21859726 (diff)
downloadgdb-12bd695738760b28c04dd34b3ff228247ec747c9.zip
gdb-12bd695738760b28c04dd34b3ff228247ec747c9.tar.gz
gdb-12bd695738760b28c04dd34b3ff228247ec747c9.tar.bz2
bfd/
* elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map. Delete num_locals and num_globals. (elf_num_locals, elf_num_globals): Don't define. (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker, elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define. * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c, * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c, * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c, * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata accessor macros. * elf.c (elf_map_symbols): Add pnum_locals param. Return number of locals syms via new param. (swap_out_syms): Adjust to suit elf_map_symbols change. ld/ * emultempl/elf-generic.em: Use newly defined elf_obj_tdata accessor macros.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b652bec..e9ed760 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5667,9 +5667,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
/* Determine any GNU_STACK segment requirements, after the backend
has had a chance to set a default segment size. */
if (info->execstack)
- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
+ elf_stack_flags (output_bfd) = PF_R | PF_W | PF_X;
else if (info->noexecstack)
- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
+ elf_stack_flags (output_bfd) = PF_R | PF_W;
else
{
bfd *inputobj;
@@ -5696,7 +5696,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
exec = PF_X;
}
if (notesec || info->stacksize > 0)
- elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | exec;
+ elf_stack_flags (output_bfd) = PF_R | PF_W | exec;
if (notesec && exec && info->relocatable
&& notesec->output_section != bfd_abs_section_ptr)
notesec->output_section->flags |= SEC_CODE;
@@ -10783,10 +10783,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* sh_offset is set just below. */
symtab_hdr->sh_addralign = (bfd_vma) 1 << bed->s->log_file_align;
- off = elf_tdata (abfd)->next_file_pos;
+ off = elf_next_file_pos (abfd);
off = _bfd_elf_assign_file_position_for_section (symtab_hdr, off, TRUE);
- /* Note that at this point elf_tdata (abfd)->next_file_pos is
+ /* Note that at this point elf_next_file_pos (abfd) is
incorrect. We do not yet know the size of the .symtab section.
We correct next_file_pos below, after we do know the size. */
@@ -11242,7 +11242,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
symstrtab_hdr->sh_addralign = 1;
off = _bfd_elf_assign_file_position_for_section (symstrtab_hdr, off, TRUE);
- elf_tdata (abfd)->next_file_pos = off;
+ elf_next_file_pos (abfd) = off;
if (bfd_get_symcount (abfd) > 0)
{
@@ -11538,7 +11538,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
elf_final_link_free (abfd, &flinfo);
- elf_tdata (abfd)->linker = TRUE;
+ elf_linker (abfd) = TRUE;
if (attr_section)
{