From f4943d8253e8c9c539fd72d23e94a65f84c92d1a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 10 Dec 2014 21:44:34 +1030 Subject: Don't always build coffgen.o Removes a bunch of unused functions from libbfd when building ELF or AOUT. Split off the bits we need externally when not building a COFF target into coff-bfd.c and coff-bfd.h. bfd/ * Makefile.am (BFD32_LIBS, BFD32_LIBS_CFILES): Remove dwarf2 and coffgen. Add coff-bfd. Sort. (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add coffgen and dwarf2. * bfd-in.h (bfd_coff_get_syment, bfd_coff_get_auxent): Delete. (struct coff_comdat_info, bfd_coff_get_comdat_section): Delete. * coffgen.c (coff_symbol_from): Move to coff-bfd.h as macro, without unused param. Update uses. (bfd_coff_get_comdat_section): Move to coff-bfd.h as macro. (bfd_coff_get_syment, bfd_coff_get_auxent): Move to coff-bfd.c. * libcoff-in.h: #include "coff-bfd.h". (struct coff_section_tdata, coff_section_data): Move to coff-bfd.h. (coff_symbol_from): Delete. * coff-bfd.c: New file. * coff-bfd.h: New file. * coff-i386.c: Update coff_symbol_from occurrences. * coff-i960.c: Likewise. * coff-m68k.c: Likewise. * coff-sh.c: Likewise. * coff-x86_64.c: Likewise. * coffcode.h: Likewise. * pe-mips.c: Likewise. * configure.ac (elf): Add dwarf2.lo. (coffgen, coff, ecoff, xcoff): Define. Use when mapping bfd target vectors to .o files. Add dwarf2 for mach-o targets. Fix the sh target FIXME. * po/SRC-POTFILES.in: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. * bfd-in2.h: Regenerate. * libcoff.h: Regenerate. binutils/ * objdump.c: #include "coff-bfd.h". ld/ * ldmisc.c: #include "coff-bfd.h" --- ld/ChangeLog | 4 ++++ ld/ldmisc.c | 1 + 2 files changed, 5 insertions(+) (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index 7607418e87..ce90a67e33 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2014-12-10 Alan Modra + + * ldmisc.c: #include "coff-bfd.h" + 2014-12-06 Eric Botcazou * configure.tgt: Add Visium support. diff --git a/ld/ldmisc.c b/ld/ldmisc.c index 5e1801321e..af2a044f68 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -35,6 +35,7 @@ #include "ldmain.h" #include "ldfile.h" #include "elf-bfd.h" +#include "coff-bfd.h" /* %% literal % -- cgit v1.2.3