binutils-gdb/bfd
Nick Alcock 1ff6de0312 bfd, ld: add CTF section linking
This is quite complicated because the CTF section's contents depend on
the final contents of the symtab and strtab, because it has two sections
whose contents are shuffled to be in 1:1 correspondence with the symtab,
and an internal strtab that gets deduplicated against the ELF strtab
(with offsets adjusted to point into the ELF strtab instead).  It is
also compressed if large enough, so its size depends on its contents!

So we cannot construct it as early as most sections: we cannot even
*begin* construction until after the symtab and strtab are finalized.
Thankfully there is already one section treated similarly: compressed
debugging sections: the only differences are that compressed debugging
sections have extra handling to deal with their changing name if
compressed (CTF sections are always called ".ctf" for now, though we
have reserved ".ctf.*" against future use), and that compressed
debugging sections have previously-uncompressed content which has to be
stashed away for later compression, while CTF sections have no content
at all until we generate it (very late).

BFD also cannot do the link itself: libctf knows how to do it, and BFD
cannot call libctf directly because libctf already depends on bfd for
file I/O.  So we have to use a pair of callbacks, one, examine_strtab,
which allows a caller to examine the symtab and strtab after
finalization (called from elf_link_swap_symbols_out(), right before the
symtabs are written, and after the strtab has been finalized), and one
which actually does the emission (called emit_ctf simply because it is
grouped with a bunch of section-specific late-emission function calls at
the bottom of bfd_elf_final_link, and a section-specific name seems best
for that).  emit_ctf is actually called *twice*: once from lang_process
if the emulation suggests that this bfd target does not examine the
symtab or strtab, and once via a bfd callback if it does.  (This means
that non-ELF targets still get CTF emitted, even though the late CTF
emission stage is never called for them).

v2: merged with non-ELF support patch: slight commit message
    adjustments.
v3: do not spend time merging CTF, or crash, if the CTF section is
    explicitly discarded.  Do not try to merge or compress CTF unless
    linking.
v4: add CTF_COMPRESSION_THRESHOLD.  Annul the freed input ctf_file_t's
    after writeout: set SEC_IN_MEMORY on the output contents so a future
    bfd enhancement knows it could free it.  Add SEC_LINKER_CREATED |
    SEC_KEEP to avoid having to add .ctf to the linker script.  Drop
    now-unnecessary ldlang.h-level elf-bfd.h include and hackery around
    it.  Adapt to elf32.em->elf.em and elf-generic.em->ldelf*.c
    changes.
v5: fix tabdamage.  Drop #inclusions in .h files: include in .c files,
    .em files, and use struct forwards instead.  Use bfd_section_is_ctf
    inline function rather than SECTION_IS_CTF macro.  Move a few
    comments.

	* Makefile.def (dependencies): all-ld depends on all-libctf.
	* Makefile.in: Regenerated.

include/
	* bfdlink.h (elf_strtab_hash): New forward.
	(elf_sym_strtab): Likewise.
	(struct bfd_link_callbacks <examine_strtab>): New.
	(struct bfd_link_callbacks <emit_ctf>): Likewise.

bfd/
	* elf-bfd.h (bfd_section_is_ctf): New inline function.
	* elf.c (special_sections_c): Add ".ctf".
	(assign_file_positions_for_non_load_sections): Note that
	compressed debugging sections etc are not assigned here.  Treat
	CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
	sh_offset -1.
	(assign_file_positions_except_relocs): Likewise.
	(find_section_in_list): Note that debugging and CTF sections, as
	well as reloc sections, are assigned later.
	(_bfd_elf_assign_file_positions_for_non_load): CTF sections get
	their size and contents updated.
	(_bfd_elf_set_section_contents): Skip CTF sections: unlike
	compressed sections, they have no uncompressed content to copy at
	this stage.
	* elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
	callback right before the strtab is written out.
	(bfd_elf_final_link): Don't cache the section contents of CTF
	sections: they are not populated yet.  Call the emit_ctf callback
	right at the end, after all the symbols and strings are flushed
	out.

ld/
	* ldlang.h: (struct lang_input_statement_struct): Add the_ctf.
	(struct elf_sym_strtab): Add forward.
	(struct elf_strtab_hash): Likewise.
	(ldlang_ctf_apply_strsym): Declare.
	(ldlang_write_ctf_late): Likewise.
	* ldemul.h (ldemul_emit_ctf_early): New.
	(ldemul_examine_strtab_for_ctf): Likewise.
	(ld_emulation_xfer_type) <emit_ctf_early>: Likewise.
	(ld_emulation_xfer_type) <examine_strtab_for_ctf>: Likewise.
	* ldemul.c (ldemul_emit_ctf_early): New.
	(ldemul_examine_strtab_for_ctf): Likewise.
	* ldlang.c: Include ctf-api.h.
	(CTF_COMPRESSION_THRESHOLD): New.
	(ctf_output): New. Initialized in...
	(ldlang_open_ctf): ... this new function.  Open all the CTF
	sections in the input files: mark them non-loaded and empty
	so as not to copy their contents to the output, but linker-created
	so the section gets created in the target.
	(ldlang_merge_ctf): New, merge types via ctf_link_add_ctf and
	ctf_link.
	(ldlang_ctf_apply_strsym): New, an examine_strtab callback: wrap
	ldemul_examine_strtab_for_ctf.
	(lang_write_ctf): New, write out the CTF section.
	(ldlang_write_ctf_late): New, late call via bfd's emit_ctf hook.
	(lang_process): Call ldlang_open_ctf, ldlang_merge_ctf, and
	lang_write_ctf.
	* ldmain.c (link_callbacks): Add ldlang_ctf_apply_strsym,
	ldlang_write_ctf_late.
	* emultempl/aix.em: Add ctf-api.h.
	* emultempl/armcoff.em: Likewise.
	* emultempl/beos.em: Likewise.
	* emultempl/elf.em: Likewise.
	* emultempl/generic.em: Likewise.
	* emultempl/linux.em: Likewise.
	* emultempl/msp430.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
	* emultempl/ticoff.em: Likewise.
	* emultempl/vanilla.em: Likewise.
	* ldcref.c: Likewise.
	* ldctor.c: Likewise.
	* ldelf.c: Likewise.
	* ldelfgen.c: Likewise.
	* ldemul.c: Likewise.
	* ldexp.c: Likewise.
	* ldfile.c: Likewise.
	* ldgram.c: Likewise.
	* ldlex.l: Likewise.
	* ldmain.c: Likewise.
	* ldmisc.c: Likewise.
	* ldver.c: Likewise.
	* ldwrite.c: Likewise.
	* lexsup.c: Likewise.
	* mri.c: Likewise.
	* pe-dll.c: Likewise.
	* plugin.c: Likewise.

	* ldelfgen.c (ldelf_emit_ctf_early): New.
	(ldelf_examine_strtab_for_ctf): tell libctf about the symtab and
	strtab.
	(struct ctf_strsym_iter_cb_arg): New, state to do so.
	(ldelf_ctf_strtab_iter_cb): New: tell libctf about
	each string in the strtab in turn.
	(ldelf_ctf_symbols_iter_cb): New, tell libctf
	about each symbol in the symtab in turn.
	* ldelfgen.h (struct elf_sym_strtab): Add forward.
	(struct elf_strtab_hash): Likewise.
	(struct ctf_file): Likewise.
	(ldelf_emit_ctf_early): Declare.
	(ldelf_examine_strtab_for_ctf): Likewise.
	* emultempl/elf-generic.em (LDEMUL_EMIT_CTF_EARLY): Set it.
	(LDEMUL_EXAMINE_STRTAB_FOR_CTF): Likewise.
	* emultempl/aix.em (ld_${EMULATION_NAME}_emulation): Add
	emit_ctf_early and examine_strtab_for_ctf, NULL by default.
	* emultempl/armcoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/beos.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/elf.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/generic.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/linux.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/msp430.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/pe.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/pep.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/ticoff.em (ld_${EMULATION_NAME}_emulation): Likewise.
	* emultempl/vanilla.em (ld_vanilla_emulation): Likewise.

	* Makefile.am: Pull in libctf (and zlib, a transitive requirement
	for compressed CTF section emission).  Pass it on to DejaGNU.
	* configure.ac: Add AM_ZLIB.
	* aclocal.m4: Added zlib.m4.
	* Makefile.in: Regenerated.
	* testsuite/ld-bootstrap/bootstrap.exp: Use it when relinking ld.
2019-10-03 17:04:56 +01:00
..
doc Re-generate many configure and Makefile.in files 2019-09-18 09:09:15 -04:00
hosts
po bfd Makefile update 2019-09-23 10:27:22 +09:30
.gitignore
acinclude.m4
aclocal.m4
aix5ppc-core.c
aix386-core.c
aout32.c
aout64.c
aout-cris.c bfd_asymbol_* macros 2019-09-18 23:07:31 +09:30
aout-ns32k.c
aout-target.h Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
aout-tic30.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
aoutx.h bfd_section_* macros 2019-09-19 09:40:13 +09:30
arc-got.h
arc-plt.def
arc-plt.h
archive64.c Don't use bfd_get_* macro to set bfd fields 2019-09-18 22:21:58 +09:30
archive.c bfd macro conversion to inline functions 2019-09-20 18:04:02 +09:30
archures.c Constify bfd_octets_per_byte and related functions 2019-09-18 22:20:13 +09:30
bfd-in2.h linker bfd.h tidy 2019-09-23 10:27:22 +09:30
bfd-in.h linker bfd.h tidy 2019-09-23 10:27:22 +09:30
bfd.c bfd macro conversion to inline functions, section 2019-09-20 18:04:03 +09:30
bfd.m4
bfdio.c
bfdwin.c
binary.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
cache.c
cf-i386lynx.c
ChangeLog bfd, ld: add CTF section linking 2019-10-03 17:04:56 +01:00
ChangeLog-0001
ChangeLog-0203
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-9193
ChangeLog-9495
ChangeLog-9697
ChangeLog-9899
cisco-core.c
coff64-rs6000.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
coff-alpha.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
coff-arm.c arm bfd.h tidy 2019-09-23 10:27:21 +09:30
coff-arm.h arm bfd.h tidy 2019-09-23 10:27:21 +09:30
coff-bfd.c
coff-bfd.h coff bfd.h tidy 2019-09-23 10:27:21 +09:30
coff-go32.c
coff-i386.c
coff-ia64.c
coff-mcore.c
coff-mips.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
coff-ppc.c Don't use bfd_get_* macro to set bfd fields 2019-09-18 22:21:58 +09:30
coff-rs6000.c xcoff bfd.h tidy 2019-09-23 10:27:21 +09:30
coff-sh.c
coff-stgo32.c
coff-tic4x.c
coff-tic30.c
coff-tic54x.c tic54x bfd.h tidy 2019-09-23 10:27:21 +09:30
coff-tic80.c
coff-x86_64.c
coff-z8k.c
coff-z80.c
coffcode.h bfd_section_* macros 2019-09-19 09:40:13 +09:30
coffgen.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
cofflink.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
coffswap.h
compress.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
config.bfd
config.in
configure Re-generate many configure and Makefile.in files 2019-09-18 09:09:15 -04:00
configure.ac
configure.com
configure.host
COPYING
corefile.c bfd_get_filename 2019-09-06 12:22:59 +09:30
cpu-aarch64.c aarch64 bfd.h tidy 2019-09-23 10:27:21 +09:30
cpu-aarch64.h aarch64 bfd.h tidy 2019-09-23 10:27:21 +09:30
cpu-alpha.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-arc.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-arm.c arm bfd.h tidy 2019-09-23 10:27:21 +09:30
cpu-arm.h arm bfd.h tidy 2019-09-23 10:27:21 +09:30
cpu-avr.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-bfin.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-bpf.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-cr16.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-cr16c.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-cris.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-crx.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-csky.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-d10v.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-d30v.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-dlx.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-epiphany.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-fr30.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-frv.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-ft32.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-h8300.c h8300 bfd.h tidy 2019-09-23 10:27:21 +09:30
cpu-h8300.h h8300 bfd.h tidy 2019-09-23 10:27:21 +09:30
cpu-hppa.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-i386.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-ia64-opc.c
cpu-ia64.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-iamcu.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-ip2k.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-iq2000.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-k1om.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-l1om.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-lm32.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m9s12x.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m9s12xg.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m32c.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m32r.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m68hc11.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m68hc12.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m68k.c m68k bfd.h tidy 2019-09-23 10:27:22 +09:30
cpu-m68k.h m68k bfd.h tidy 2019-09-23 10:27:22 +09:30
cpu-m10200.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-m10300.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-mcore.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-mep.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-metag.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-microblaze.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-mips.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-mmix.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-moxie.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-msp430.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-mt.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-nds32.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-nfp.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-nios2.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-ns32k.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-or1k.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-pdp11.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-pj.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-plugin.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-powerpc.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-pru.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-riscv.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-rl78.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-rs6000.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-rx.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-s12z.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-s390.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-score.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-sh.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-sparc.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-spu.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tic4x.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tic6x.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tic30.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tic54x.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tic80.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tilegx.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-tilepro.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-v850_rh850.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-v850.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-vax.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-visium.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-wasm32.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-xc16x.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-xgate.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-xstormy16.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-xtensa.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-z8k.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
cpu-z80.c Enhance the disassembler so that it will reliably determine whether a reloc applies to the middle of the next insn. 2019-09-10 15:20:58 +01:00
dep-in.sed
development.sh
dwarf1.c
dwarf2.c bfd_asymbol_* macros 2019-09-18 23:07:31 +09:30
ecoff-bfd.h ecoff bfd.h tidy 2019-09-23 10:27:22 +09:30
ecoff.c ecoff bfd.h tidy 2019-09-23 10:27:22 +09:30
ecofflink.c ecoff bfd.h tidy 2019-09-23 10:27:22 +09:30
ecoffswap.h
elf32-am33lin.c
elf32-arc.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-arm.c arm bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-arm.h arm bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-avr.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-avr.h
elf32-bfin.c bfin bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-bfin.h bfin bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-cr16.c cr16 bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-cr16.h cr16 bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-cr16c.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-cris.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-crx.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-csky.c csky bfd.h tidy 2019-09-23 10:27:20 +09:30
elf32-csky.h csky bfd.h tidy 2019-09-23 10:27:20 +09:30
elf32-d10v.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-d30v.c ELF final_write_processing 2019-07-23 18:22:02 +09:30
elf32-dlx.c
elf32-dlx.h
elf32-epiphany.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-fr30.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-frv.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-ft32.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-gen.c
elf32-h8300.c h8300 bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-hppa.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-hppa.h
elf32-i386.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-ip2k.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-iq2000.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-lm32.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-m32c.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-m32r.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-m68hc1x.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-m68hc1x.h
elf32-m68hc11.c ELF final_write_processing 2019-07-23 18:22:02 +09:30
elf32-m68hc12.c ELF final_write_processing 2019-07-23 18:22:02 +09:30
elf32-m68k.c m68k bfd.h tidy 2019-09-23 10:27:22 +09:30
elf32-m68k.h m68k bfd.h tidy 2019-09-23 10:27:22 +09:30
elf32-mcore.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-mep.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-metag.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-metag.h
elf32-microblaze.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-mips.c bfd_asymbol_* macros 2019-09-18 23:07:31 +09:30
elf32-moxie.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-msp430.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-mt.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-nds32.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-nds32.h
elf32-nios2.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-nios2.h
elf32-or1k.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-pj.c Complain about mbind, ifunc, and unique in final_write 2019-07-24 16:12:02 +09:30
elf32-ppc.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-ppc.h
elf32-pru.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-rl78.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-rx.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-rx.h
elf32-s12z.c ELF final_write_processing 2019-07-23 18:22:02 +09:30
elf32-s390.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-score7.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-score.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-score.h
elf32-sh-relocs.h
elf32-sh.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-sparc.c Complain about mbind, ifunc, and unique in final_write 2019-07-24 16:12:02 +09:30
elf32-spu.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-spu.h
elf32-tic6x.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-tic6x.h tic6x bfd.h tidy 2019-09-23 10:27:21 +09:30
elf32-tilegx.c
elf32-tilegx.h
elf32-tilepro.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-tilepro.h
elf32-v850.c v850 bfd.h tidy 2019-09-23 10:27:20 +09:30
elf32-v850.h v850 bfd.h tidy 2019-09-23 10:27:20 +09:30
elf32-vax.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-visium.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-wasm32.c
elf32-xc16x.c Complain about mbind, ifunc, and unique in final_write 2019-07-24 16:12:02 +09:30
elf32-xgate.c
elf32-xstormy16.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32-xtensa.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf32.c
elf64-alpha.c ecoff bfd.h tidy 2019-09-23 10:27:22 +09:30
elf64-bpf.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64-gen.c
elf64-hppa.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64-hppa.h
elf64-ia64-vms.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64-mips.c
elf64-mmix.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64-nfp.c
elf64-ppc.c PowerPC64 dynamic symbol tweaks 2019-09-23 23:49:25 +09:30
elf64-ppc.h
elf64-s390.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64-sparc.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64-tilegx.c
elf64-tilegx.h
elf64-x86-64.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf64.c
elf-attrs.c
elf-bfd.h bfd, ld: add CTF section linking 2019-10-03 17:04:56 +01:00
elf-eh-frame.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-hppa.h bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-ifunc.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-linker-x86.h
elf-linux-core.h
elf-m10200.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-m10300.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-nacl.c Complain about mbind, ifunc, and unique in final_write 2019-07-24 16:12:02 +09:30
elf-nacl.h Complain about mbind, ifunc, and unique in final_write 2019-07-24 16:12:02 +09:30
elf-properties.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-s390-common.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-s390.h
elf-strtab.c bfd: new functions for getting strings out of a strtab 2019-10-03 17:04:55 +01:00
elf-vxworks.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elf-vxworks.h Complain about mbind, ifunc, and unique in final_write 2019-07-24 16:12:02 +09:30
elf.c bfd, ld: add CTF section linking 2019-10-03 17:04:56 +01:00
elfcode.h PR24955, libbfd terminating program on out of memory 2019-09-05 11:33:34 +09:30
elfcore.h Don't use bfd_get_* macro to set bfd fields 2019-09-18 22:21:58 +09:30
elflink.c bfd, ld: add CTF section linking 2019-10-03 17:04:56 +01:00
elfn32-mips.c bfd_asymbol_* macros 2019-09-18 23:07:31 +09:30
elfnn-aarch64.c aarch64 bfd.h tidy 2019-09-23 10:27:21 +09:30
elfnn-ia64.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elfnn-riscv.c RISC-V: Optimize lui and auipc relaxations for undefweak symbol. 2019-09-20 15:01:20 -07:00
elfxx-aarch64.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elfxx-aarch64.h aarch64 bfd.h tidy 2019-09-23 10:27:21 +09:30
elfxx-ia64.c
elfxx-ia64.h ia64 bfd.h tidy 2019-09-23 10:27:21 +09:30
elfxx-mips.c ecoff bfd.h tidy 2019-09-23 10:27:22 +09:30
elfxx-mips.h mips bfd.h tidy 2019-09-23 10:27:20 +09:30
elfxx-riscv.c
elfxx-riscv.h
elfxx-sparc.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elfxx-sparc.h
elfxx-target.h Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
elfxx-tilegx.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elfxx-tilegx.h
elfxx-x86.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
elfxx-x86.h
format.c
gen-aout.c
genlink.h
go32stub.h
hash.c
host-aout.c
hppabsd-core.c
hpux-core.c
i386aout.c
i386bsd.c
i386lynx.c
i386msdos.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
ihex.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
init.c
irix-core.c
libaout.h
libbfd-in.h Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
libbfd.c
libbfd.h Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
libcoff-in.h Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
libcoff.h Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
libecoff.h
libhppa.h
libpei.h
libxcoff.h
linker.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
lynx-core.c
mach-o-aarch64.c
mach-o-arm.c
mach-o-i386.c
mach-o-target.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
mach-o-x86-64.c
mach-o.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
mach-o.h
MAINTAINERS
Makefile.am PR24262, plugin search dir doesn't respect --libdir 2019-09-26 19:51:18 +09:30
Makefile.in PR24262, plugin search dir doesn't respect --libdir 2019-09-26 19:51:18 +09:30
makefile.vms
mep-relocs.pl
merge.c
mmo.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
netbsd-core.c
netbsd.h
ns32k.h
ns32knetbsd.c
opncls.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
osf-core.c
pc532-mach.c
pdp11.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
pe-arm-wince.c arm bfd.h tidy 2019-09-23 10:27:21 +09:30
pe-arm.c arm bfd.h tidy 2019-09-23 10:27:21 +09:30
pe-i386.c
pe-mcore.c
pe-ppc.c
pe-sh.c
pe-x86_64.c
pef-traceback.h
pef.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
pef.h
pei-arm-wince.c
pei-arm.c
pei-i386.c
pei-ia64.c
pei-mcore.c
pei-ppc.c
pei-sh.c
pei-x86_64.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
peicode.h bfd_section_* macros 2019-09-19 09:40:13 +09:30
peXXigen.c Allow objdump to recognise the System.Runtime.dll files that get shipped with .NET Core 2.1. 2019-07-23 09:44:57 +01:00
plugin.c PR24262, plugin search dir doesn't respect --libdir 2019-09-26 19:51:18 +09:30
plugin.h
PORTING
ppcboot.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
ptrace-core.c
README
reloc16.c
reloc.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
rs6000-core.c
sco5-core.c
section.c bfd macro conversion to inline functions, section 2019-09-20 18:04:03 +09:30
simple.c
som.c Don't use bfd_get_* macro to set bfd fields 2019-09-18 22:21:58 +09:30
som.h
srec.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
stab-syms.c
stabs.c
stamp-h.in
syms.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
sysdep.h
targets.c bfd macro conversion to inline functions, asymbol 2019-09-20 18:04:02 +09:30
targmatch.sed
tekhex.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
TODO
trad-core.c
vax1knetbsd.c
vaxnetbsd.c
verilog.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
version.h Automatic date update in version.in 2019-10-03 00:00:20 +00:00
version.m4 Update version to 2.33.50 and regenerate configure scripts. 2019-09-16 11:03:53 +01:00
vms-alpha.c bfd_section_* macros 2019-09-19 09:40:13 +09:30
vms-lib.c Use bfd_set_filename more 2019-09-18 21:32:51 +09:30
vms-misc.c
vms.h
warning.m4
wasm-module.c
wasm-module.h
xcofflink.c xcoff bfd.h tidy 2019-09-23 10:27:21 +09:30
xcofflink.h xcoff bfd.h tidy 2019-09-23 10:27:21 +09:30
xsym.c Tidy ld/ldmisc.c 2019-09-11 13:43:29 +09:30
xsym.h
xtensa-isa.c
xtensa-modules.c

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

BFD is an object file library.  It permits applications to use the
same routines to process object files regardless of their format.

BFD is used by the GNU debugger, assembler, linker, and the binary
utilities.

The documentation on using BFD is scanty and may be occasionally
incorrect.  Pointers to documentation problems, or an entirely
rewritten manual, would be appreciated.

There is some BFD internals documentation in doc/bfdint.texi which may
help programmers who want to modify BFD.

BFD is normally built as part of another package.  See the build
instructions for that package, probably in a README file in the
appropriate directory.

BFD supports the following configure options:

  --target=TARGET
	The default target for which to build the library.  TARGET is
	a configuration target triplet, such as sparc-sun-solaris.
  --enable-targets=TARGET,TARGET,TARGET...
	Additional targets the library should support.  To include
	support for all known targets, use --enable-targets=all.
  --enable-64-bit-bfd
	Include support for 64 bit targets.  This is automatically
	turned on if you explicitly request a 64 bit target, but not
	for --enable-targets=all.  This requires a compiler with a 64
	bit integer type, such as gcc.
  --enable-shared
	Build BFD as a shared library.
  --with-mmap
	Use mmap when accessing files.  This is faster on some hosts,
	but slower on others.  It may not work on all hosts.

Report bugs with BFD to bug-binutils@gnu.org.

Patches are encouraged.  When sending patches, always send the output
of diff -u or diff -c from the original file to the new file.  Do not
send default diff output.  Do not make the diff from the new file to
the original file.  Remember that any patch must not break other
systems.  Remember that BFD must support cross compilation from any
host to any target, so patches which use ``#ifdef HOST'' are not
acceptable.  Please also read the ``Reporting Bugs'' section of the
gcc manual.

Bug reports without patches will be remembered, but they may never get
fixed until somebody volunteers to fix them.

Copyright (C) 2012-2019 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.