]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Don't include libbfd.h outside of bfd, part 1
authorAlan Modra <amodra@gmail.com>
Sat, 16 Jul 2016 03:55:11 +0000 (13:25 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 16 Jul 2016 03:55:11 +0000 (13:25 +0930)
commit76e7a75123dc36dbc4ddce8a23d2acb171c2bce2
tree4db37956bee46faf43010262730aa55fded02d33
parent235fa74903061daff9980668423860ecc760665a
Don't include libbfd.h outside of bfd, part 1

Make BFD_ALIGN available to objcopy.  Fix assertions.  Don't use
bfd_log2 in ppc32elf.em or bfd_malloc in xtensaelf.em and bucomm.c.

bfd/
* libbfd-in.h (BFD_ALIGN): Move to..
* bfd-in.h: ..here.
* elf32-ppc.h (struct ppc_elf_params): Add pagesize.
* elf32-ppc.c (default_params): Adjust init.
(ppc_elf_link_params): Set pagesize_p2.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
binutils/
* ar.c: Don't include libbfd.h.
* objcopy.c: Likewise.
* bucomm.c (bfd_get_archive_filename): Use xmalloc rather than
bfd_malloc.
gas/
* config/bfin-parse.y: Don't include libbfd.h.
* config/tc-bfin.c: Likewise.
* config/tc-rl78.c: Likewise.
* config/tc-rx.c: Likewise.
* config/tc-metag.c: Likewise.
(create_dspreg_htabs, create_scond_htab): Use gas_assert not BFD_ASSERT.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
ld/
* ldlang.c: Don't include libbfd.h.
* emultempl/nds32elf.em: Likewise.
* emultempl/ppc64elf.em: Likewise.
* emultempl/ppc32elf.em: Likewise.
(pagesize): Delete.
(params): Update init.
(ppc_after_open_output): Use params.pagesize.  Don't call bfd_log2.
(PARSE_AND_LIST_ARGS_CASES): Use params.pagesize.
* emultempl/sh64elf.em: Don't include libbfd.h.
(after_allocation): Use ASSERT, not BFD_ASSERT.
* emultempl/xtensaelf.em: Don't include libbfd.h.
(replace_insn_sec_with_prop_sec): Use xmalloc, not bfd_malloc.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
28 files changed:
bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/elf32-ppc.c
bfd/elf32-ppc.h
bfd/libbfd-in.h
bfd/libbfd.h
binutils/ChangeLog
binutils/ar.c
binutils/bucomm.c
binutils/objcopy.c
gas/ChangeLog
gas/Makefile.am
gas/Makefile.in
gas/config/bfin-parse.y
gas/config/tc-bfin.c
gas/config/tc-metag.c
gas/config/tc-rl78.c
gas/config/tc-rx.c
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/emultempl/nds32elf.em
ld/emultempl/ppc32elf.em
ld/emultempl/ppc64elf.em
ld/emultempl/sh64elf.em
ld/emultempl/xtensaelf.em
ld/ldlang.c