diff options
author | Alan Modra <amodra@gmail.com> | 2014-12-10 21:44:34 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-12-10 23:13:49 +1030 |
commit | f4943d8253e8c9c539fd72d23e94a65f84c92d1a (patch) | |
tree | fe266edba1bb0bc50b592209d8630aad00a2fe65 /bfd/coff-i960.c | |
parent | e00e81980c70659d0efe686b31a55db5faaa91f9 (diff) | |
download | gdb-f4943d8253e8c9c539fd72d23e94a65f84c92d1a.zip gdb-f4943d8253e8c9c539fd72d23e94a65f84c92d1a.tar.gz gdb-f4943d8253e8c9c539fd72d23e94a65f84c92d1a.tar.bz2 |
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"
Diffstat (limited to 'bfd/coff-i960.c')
-rw-r--r-- | bfd/coff-i960.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c index 1448257..963433e 100644 --- a/bfd/coff-i960.c +++ b/bfd/coff-i960.c @@ -62,22 +62,22 @@ coff_i960_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) /* This is just like the usual CALC_ADDEND, but it includes the section VMA for PC relative relocs. */ #ifndef CALC_ADDEND -#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \ - { \ - coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \ - if (ptr && bfd_asymbol_bfd (ptr) != abfd) \ - coffsym = (obj_symbols (abfd) \ - + (cache_ptr->sym_ptr_ptr - symbols)); \ - else if (ptr) \ - coffsym = coff_symbol_from (abfd, ptr); \ - if (coffsym != (coff_symbol_type *) NULL \ - && coffsym->native->u.syment.n_scnum == 0) \ - cache_ptr->addend = 0; \ - else if (ptr && bfd_asymbol_bfd (ptr) == abfd \ - && ptr->section != (asection *) NULL) \ - cache_ptr->addend = - (ptr->section->vma + ptr->value); \ - else \ - cache_ptr->addend = 0; \ +#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \ + { \ + coff_symbol_type *coffsym = (coff_symbol_type *) NULL; \ + if (ptr && bfd_asymbol_bfd (ptr) != abfd) \ + coffsym = (obj_symbols (abfd) \ + + (cache_ptr->sym_ptr_ptr - symbols)); \ + else if (ptr) \ + coffsym = coff_symbol_from (ptr); \ + if (coffsym != (coff_symbol_type *) NULL \ + && coffsym->native->u.syment.n_scnum == 0) \ + cache_ptr->addend = 0; \ + else if (ptr && bfd_asymbol_bfd (ptr) == abfd \ + && ptr->section != (asection *) NULL) \ + cache_ptr->addend = - (ptr->section->vma + ptr->value); \ + else \ + cache_ptr->addend = 0; \ if (ptr && (reloc.r_type == 25 || reloc.r_type == 27)) \ cache_ptr->addend += asect->vma; \ } |