binutils-gdb/bfd
Nick Alcock 3d16b64e28 bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym
This is embarrassing.

The whole point of CTF is that it remains intact even after a binary is
stripped, providing a compact mapping from symbols to types for
everything in the externally-visible interface of an ELF object: it has
connections to the symbol table for that purpose, and to the string
table to avoid duplicating symbol names.  So it's a shame that the hooks
I implemented last year served to hook it up to the .symtab and .strtab,
which obviously disappear on strip, leaving any accompanying the CTF
dict containing references to strings (and, soon, symbols) which don't
exist any more because their containing strtab has been vaporized.  The
original Solaris design used .dynsym and .dynstr (well, actually,
.ldynsym, which has more symbols) which do not disappear. So should we.

Thankfully the work we did before serves as guide rails, and adjusting
things to use the .dynstr and .dynsym was fast and easy.  The only
annoyance is that the dynsym is assembled inside elflink.c in a fairly
piecemeal fashion, so that the easiest way to get the symbols out was to
hook in before every call to swap_symbol_out (we also leave in a hook in
front of symbol additions to the .symtab because it seems plausible that
we might want to hook them in future too: for now that hook is unused).
We adjust things so that rather than being offered a whole hash table of
symbols at once, libctf is now given symbols one at a time, with st_name
indexes already resolved and pointing at their final .dynstr offsets:
it's now up to libctf to resolve these to names as needed using the
strtab info we pass it separately.

Some bits might be contentious.  The ctf_new_dynstr callback takes an
elf_internal_sym, and this remains an elf_internal_sym right down
through the generic emulation layers into ldelfgen.  This is no worse
than the elf_sym_strtab we used to pass down, but in the future when we
gain non-ELF CTF symtab support we might want to lower the
elf_internal_sym to some other representation (perhaps a
ctf_link_symbol) in bfd or in ldlang_ctf_new_dynsym.  We rename the
'apply_strsym' hooks to 'acquire_strings' instead, becuse they no longer
have anything to do with symbols.

There are some API changes to pieces of API which are technically public
but actually totally unused by anything and/or unused by anything but ld
so they can change freely: the ctf_link_symbol gains new fields to allow
symbol names to be given as strtab offsets as well as strings, and a
symidx so that the symbol index can be passed in.  ctf_link_shuffle_syms
loses its callback parameter: the idea now is that linkers call the new
ctf_link_add_linker_symbol for every symbol in .dynsym, feed in all the
strtab entries with ctf_link_add_strtab, and then a call to
ctf_link_shuffle_syms will apply both and arrange to use them to reorder
the CTF symtab at CTF serialization time (which is coming in the next
commit).

Inside libctf we have a new preamble flag CTF_F_DYNSTR which is always
set in v3-format CTF dicts from this commit forwards: CTF dicts without
this flag are associated with .strtab like they used to be, so that old
dicts' external strings don't turn to garbage when loaded by new libctf.
Dicts with this flag are associated with .dynstr and .dynsym instead.
(The flag is not the next in sequence because this commit was written
quite late: the missing flags will be filled in by the next commit.)

Tests forthcoming in a later commit in this series.

bfd/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* elflink.c (elf_finalize_dynstr): Call examine_strtab after
	dynstr finalization.
	(elf_link_swap_symbols_out): Don't call it here.  Call
	ctf_new_symbol before swap_symbol_out.
	(elf_link_output_extsym): Call ctf_new_dynsym before
	swap_symbol_out.
	(bfd_elf_final_link): Likewise.
	* elf.c (swap_out_syms): Pass in bfd_link_info.  Call
	ctf_new_symbol before swap_symbol_out.
	(_bfd_elf_compute_section_file_positions): Adjust.

binutils/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* readelf.c (dump_section_as_ctf): Use .dynsym and .dynstr, not
	.symtab and .strtab.

include/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* bfdlink.h (struct elf_sym_strtab): Replace with...
	(struct elf_internal_sym): ... this.
	(struct bfd_link_callbacks) <examine_strtab>: Take only a
	symstrtab argument.
	<ctf_new_symbol>: New.
	<ctf_new_dynsym>: Likewise.
	* ctf-api.h (struct ctf_link_sym) <st_symidx>: New.
	<st_nameidx>: Likewise.
	<st_nameidx_set>: Likewise.
	(ctf_link_iter_symbol_f): Removed.
	(ctf_link_shuffle_syms): Remove most parameters, just takes a
	ctf_dict_t now.
	(ctf_link_add_linker_symbol): New, split from
	ctf_link_shuffle_syms.
	* ctf.h (CTF_F_DYNSTR): New.
	(CTF_F_MAX): Adjust.

ld/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* ldelfgen.c (struct ctf_strsym_iter_cb_arg): Rename to...
	(struct ctf_strtab_iter_cb_arg): ... this, changing fields:
	<syms>: Remove.
	<symcount>: Remove.
	<symstrtab>: Rename to...
	<strtab>: ... this.
	(ldelf_ctf_strtab_iter_cb): Adjust.
	(ldelf_ctf_symbols_iter_cb): Remove.
	(ldelf_new_dynsym_for_ctf): New, tell libctf about a single
	symbol.
	(ldelf_examine_strtab_for_ctf): Rename to...
	(ldelf_acquire_strings_for_ctf): ... this, only doing the strtab
	portion and not symbols.
	* ldelfgen.h: Adjust declarations accordingly.
	* ldemul.c (ldemul_examine_strtab_for_ctf): Rename to...
	(ldemul_acquire_strings_for_ctf): ... this.
	(ldemul_new_dynsym_for_ctf): New.
	* ldemul.h: Adjust declarations accordingly.
	* ldlang.c (ldlang_ctf_apply_strsym): Rename to...
	(ldlang_ctf_acquire_strings): ... this.
	(ldlang_ctf_new_dynsym): New.
	(lang_write_ctf): Call ldemul_new_dynsym_for_ctf with NULL to do
	the actual symbol shuffle.
	* ldlang.h (struct elf_strtab_hash): Adjust accordingly.
	* ldmain.c (bfd_link_callbacks): Wire up new/renamed callbacks.

libctf/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-link.c (ctf_link_shuffle_syms): Adjust.
	(ctf_link_add_linker_symbol): New, unimplemented stub.
	* libctf.ver: Add it.
	* ctf-create.c (ctf_serialize): Set CTF_F_DYNSTR on newly-serialized
	dicts.
	* ctf-open-bfd.c (ctf_bfdopen_ctfsect): Check for the flag: open the
	symtab/strtab if not present, dynsym/dynstr otherwise.
	* ctf-archive.c (ctf_arc_bufpreamble): New, get the preamble from
	some arbitrary member of a CTF archive.
	* ctf-impl.h (ctf_arc_bufpreamble): Declare it.
2020-11-20 13:34:07 +00:00
..
doc Unify Solaris procfs and largefile handling 2020-07-30 15:41:50 +02:00
hosts
po Fix printf formatting errors where "0x" is used as a prefix for a decimal number. 2020-10-22 12:00:10 +01:00
.gitignore
acinclude.m4
aclocal.m4
aix5ppc-core.c
aix386-core.c
aout32.c
aout64.c This patch set for the generic BFD a.out backend removes a dead #define and makes aoutx.h self-contained: [PATCH 1/2]: bfd: remove unused NO_WRITE_HEADER_KLUDGE #define [PATCH 2/2]: bfd: make aoutx.h self-contained 2020-06-03 15:24:58 +01:00
aout-cris.c
aout-ns32k.c
aout-target.h
aoutx.h Correct a comment. 2020-06-04 12:34:17 -07:00
arc-got.h C++ comments 2020-06-29 10:07:56 +09:30
arc-plt.def
arc-plt.h
archive64.c
archive.c Fix Windows-x-PPC build 2020-11-11 06:38:43 -07:00
archures.c aarch64: Add base support for Armv8-R 2020-09-08 14:14:11 +01:00
bfd-in2.h MSP430: Support relocations for subtract expressions in .uleb128 directives 2020-09-08 16:18:38 +01:00
bfd-in.h
bfd.c Ensure that compressed sections that have an ELF compression header structure at the start are correctly aligned. 2020-08-20 15:03:21 +01:00
bfd.m4 Unify Solaris procfs and largefile handling 2020-07-30 15:41:50 +02:00
bfdio.c asan: alpha-vms: mmember access within null pointer 2020-08-26 23:23:44 +09:30
bfdwin.c
binary.c Update binary_get_section_contents to seek using section's file position 2020-07-22 12:42:31 -07:00
cache.c
cf-i386lynx.c
ChangeLog bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym 2020-11-20 13:34:07 +00: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-2019
ChangeLog-9193
ChangeLog-9495
ChangeLog-9697
ChangeLog-9899
cisco-core.c
coff64-rs6000.c
coff-alpha.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
coff-arm.c
coff-arm.h
coff-bfd.c
coff-bfd.h
coff-go32.c
coff-i386.c
coff-ia64.c
coff-mcore.c
coff-mips.c
coff-rs6000.c xcoff dependency list for static libraries 2020-11-09 14:09:01 +10:30
coff-sh.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
coff-stgo32.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
coff-tic4x.c
coff-tic30.c
coff-tic54x.c
coff-x86_64.c PE/x86-64: Display PE relocation names 2020-09-15 13:56:40 -07:00
coff-z8k.c
coff-z80.c C++ comments 2020-06-29 10:07:56 +09:30
coffcode.h Remove powerpc PE support 2020-07-09 22:58:16 +09:30
coffgen.c PR26239, memory leak in _bfd_dwarf2_slurp_debug_info 2020-07-15 19:47:57 +09:30
cofflink.c Fix thinko in the code to check coff archive elements. 2020-09-09 15:00:55 +01:00
coffswap.h
compress.c
config.bfd PR26667, Add powerpc64le-*-freebsd* support 2020-10-06 17:09:27 +10:30
config.in PR26469 UBSAN: elflink.c:8742 shift exponent 6148914691236511722 2020-08-27 22:05:00 +09:30
configure RISC-V: Support GNU indirect functions. 2020-10-16 10:11:18 +08:00
configure.ac RISC-V: Support GNU indirect functions. 2020-10-16 10:11:18 +08:00
configure.com
configure.host
COPYING
corefile.c
cpu-aarch64.c aarch64: Add base support for Armv8-R 2020-09-08 14:14:11 +01:00
cpu-aarch64.h
cpu-alpha.c
cpu-arc.c
cpu-arm.c arm: Add support for Cortex-A78C 2020-11-16 20:28:14 +00:00
cpu-arm.h
cpu-avr.c
cpu-bfin.c
cpu-bpf.c bpf: add xBPF ISA 2020-08-26 15:39:00 +02:00
cpu-cr16.c
cpu-cris.c
cpu-crx.c
cpu-csky.c CSKY: Add new arch CK860. 2020-08-24 20:27:07 +08:00
cpu-d10v.c
cpu-d30v.c
cpu-dlx.c
cpu-epiphany.c
cpu-fr30.c
cpu-frv.c
cpu-ft32.c
cpu-h8300.c
cpu-h8300.h
cpu-hppa.c
cpu-i386.c Remove x86 NaCl target support 2020-06-30 08:56:14 -07:00
cpu-ia64-opc.c
cpu-ia64.c
cpu-iamcu.c
cpu-ip2k.c
cpu-iq2000.c
cpu-k1om.c
cpu-l1om.c
cpu-lm32.c
cpu-m9s12x.c
cpu-m9s12xg.c
cpu-m32c.c
cpu-m32r.c
cpu-m68hc11.c
cpu-m68hc12.c
cpu-m68k.c
cpu-m68k.h
cpu-m10200.c
cpu-m10300.c
cpu-mcore.c
cpu-mep.c
cpu-metag.c
cpu-microblaze.c
cpu-mips.c
cpu-mmix.c
cpu-moxie.c
cpu-msp430.c
cpu-mt.c
cpu-nds32.c
cpu-nfp.c
cpu-nios2.c
cpu-ns32k.c
cpu-or1k.c
cpu-pdp11.c
cpu-pj.c
cpu-powerpc.c
cpu-pru.c
cpu-riscv.c RISCV changes broke 32-bit --enable-targets=all 2020-06-26 10:58:03 +09:30
cpu-rl78.c
cpu-rs6000.c
cpu-rx.c
cpu-s12z.c
cpu-s390.c
cpu-score.c
cpu-sh.c
cpu-sparc.c
cpu-spu.c
cpu-tic4x.c
cpu-tic6x.c
cpu-tic30.c
cpu-tic54x.c
cpu-tilegx.c
cpu-tilepro.c
cpu-v850_rh850.c
cpu-v850.c
cpu-vax.c
cpu-visium.c
cpu-wasm32.c
cpu-xc16x.c
cpu-xgate.c
cpu-xstormy16.c
cpu-xtensa.c
cpu-z8k.c
cpu-z80.c
dep-in.sed
development.sh
dwarf1.c
dwarf2.c Include members in the variable table used when resolving DW_AT_specification tags. 2020-08-29 08:03:15 +01:00
ecoff-bfd.h
ecoff.c PR26389, nm prints "c" for a common symbol with -flto and -fcommon 2020-08-15 14:16:02 +09:30
ecofflink.c PR26418 UBSAN: cache.c:386 null pointer fwrite 2020-08-28 23:15:20 +09:30
ecoffswap.h
elf32-am33lin.c
elf32-arc.c elf32-arc.c: Don't cast between function pointer and void pointer 2020-10-16 10:35:23 +10:30
elf32-arm.c arm: ubsan: shift exponent 4G 2020-09-01 16:02:48 +09:30
elf32-arm.h
elf32-avr.c Fix sanitization problems in the BFD library when running the linker testsuite for the AVR target. 2020-08-26 17:43:39 +01:00
elf32-avr.h
elf32-bfin.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-bfin.h
elf32-cr16.c elf32-cr16.c tidy 2020-10-16 09:32:56 +10:30
elf32-cr16.h
elf32-cris.c CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269 2020-09-15 02:57:39 +02:00
elf32-crx.c PR26442 UBSAN: elf32-crx.c:512 cannot be represented in int 2020-08-31 20:28:09 +09:30
elf32-csky.c PR26445 UBSAN: elf32-csky.c:4115 left shift of negative value 2020-08-31 20:28:09 +09:30
elf32-csky.h
elf32-d10v.c
elf32-d30v.c
elf32-dlx.c
elf32-dlx.h
elf32-epiphany.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-fr30.c
elf32-frv.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-ft32.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-gen.c
elf32-h8300.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-hppa.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-hppa.h
elf32-i386.c elf: Add sym_cache to elf_link_hash_table 2020-07-30 03:41:44 -07:00
elf32-ip2k.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-iq2000.c
elf32-lm32.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-m32c.c PR26463, ASAN: m32c_elf_relax_section elf32-m32c.c:1448 2020-08-25 23:07:10 +09:30
elf32-m32r.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-m68hc1x.c
elf32-m68hc1x.h elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-m68hc11.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-m68hc12.c
elf32-m68k.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-m68k.h
elf32-mcore.c
elf32-mep.c PR26466 UBSAN: elf32-mep.c:300 left shift of negative value 2020-08-31 20:28:10 +09:30
elf32-metag.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-metag.h
elf32-microblaze.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-mips.c MIPS/LD: Set symtab's `sh_info' correctly for IRIX emulations 2020-07-29 20:56:41 +01:00
elf32-moxie.c
elf32-msp430.c MSP430: Support relocations for subtract expressions in .uleb128 directives 2020-09-08 16:18:38 +01:00
elf32-mt.c
elf32-nds32.c Set SEC_SMALL_DATA on small common 2020-08-15 15:14:42 +09:30
elf32-nds32.h elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-nios2.c Set SEC_SMALL_DATA on small common 2020-08-15 15:14:42 +09:30
elf32-nios2.h
elf32-or1k.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-pj.c
elf32-ppc.c PR26483, ASAN: ppc_elf_link_params elf32-ppc.c:2314 2020-08-25 02:11:13 +09:30
elf32-ppc.h
elf32-pru.c ubasn: elf32-pru.c:570 left shift of negative value 2020-09-02 16:30:42 +09:30
elf32-rl78.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-rx.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf32-rx.h
elf32-s12z.c
elf32-s390.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-score7.c Set SEC_SMALL_DATA on small common 2020-08-15 15:14:42 +09:30
elf32-score.c Set SEC_SMALL_DATA on small common 2020-08-15 15:14:42 +09:30
elf32-score.h
elf32-sh-relocs.h
elf32-sh.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-sparc.c ELF: Add target_os to elf_link_hash_table/elf_backend_data 2020-06-06 06:45:38 -07:00
elf32-spu.c PR26498 UBSAN: elf32-spu.c:2292 left shift overflow 2020-08-26 23:23:45 +09:30
elf32-spu.h
elf32-tic6x.c Set SEC_SMALL_DATA on small common 2020-08-15 15:14:42 +09:30
elf32-tic6x.h
elf32-tilegx.c
elf32-tilegx.h
elf32-tilepro.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf32-tilepro.h
elf32-v850.c Set SEC_SMALL_DATA on small common 2020-08-15 15:14:42 +09:30
elf32-v850.h
elf32-vax.c ELF: Add _bfd_elf_add_dynamic_tags 2020-06-23 05:07:45 -07:00
elf32-visium.c
elf32-wasm32.c
elf32-xc16x.c
elf32-xgate.c
elf32-xstormy16.c PR26505, ASAN: xstormy16_elf_relax_section elf32-xstormy16.c:595 2020-08-25 23:07:10 +09:30
elf32-xtensa.c PR26507 UBSAN: elf32-xtensa.c:6013 null pointer bsearch 2020-08-26 23:23:45 +09:30
elf32-z80.c
elf32.c
elf64-alpha.c Re: commit eae0b5c3b2 2020-08-27 21:56:33 +09:30
elf64-bpf.c bpf: fix false overflow in eBPF ELF backend linker 2020-08-07 20:36:47 +02:00
elf64-gen.c
elf64-hppa.c Fix seg-fault when running the ld testsuite for the hppa64-linux target. 2020-10-27 16:23:09 +00:00
elf64-hppa.h
elf64-ia64-vms.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elf64-mips.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf64-mmix.c mmix bfd: fix bfd_assert for R_MMIX_PUSHJ_STUBBABLE against undef'd symbol 2020-07-15 06:22:28 +02:00
elf64-nfp.c
elf64-ppc.c R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA sanity check 2020-10-16 09:26:32 +10:30
elf64-ppc.h PR26655, Power10 libstdc++.so R_PPC64_NONE dynamic relocs 2020-09-24 07:52:53 +09:30
elf64-s390.c Fix a bug in the s390x linker when discarding all inpuit files. 2020-11-19 17:36:24 +00:00
elf64-sparc.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf64-tilegx.c
elf64-tilegx.h
elf64-x86-64.c PR26330, Malloc size error in objdump 2020-08-03 14:07:31 +09:30
elf64.c
elf-attrs.c
elf-bfd.h Support SHF_GNU_RETAIN ELF section flag 2020-11-18 11:51:13 +00:00
elf-eh-frame.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf-hppa.h
elf-ifunc.c IFUNC: Update IFUNC resolver check with DT_TEXTREL 2020-06-09 06:57:25 -07:00
elf-linker-x86.h x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker 2020-10-09 05:13:26 -07:00
elf-linux-core.h
elf-m10200.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf-m10300.c mn10300: ubsan: shift exponent too large 2020-08-31 20:28:08 +09:30
elf-nacl.c PR26430, ASAN: nacl_modify_segment_map elf-nacl.c:164 2020-08-25 23:07:10 +09:30
elf-nacl.h
elf-properties.c
elf-s390-common.c ELF: Move dyn_relocs to struct elf_link_hash_entry 2020-06-01 18:19:05 -07:00
elf-s390.h
elf-strtab.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
elf-vxworks.c ELF: Add _bfd_elf_add_dynamic_tags 2020-06-23 05:07:45 -07:00
elf-vxworks.h ELF: Add _bfd_elf_add_dynamic_tags 2020-06-23 05:07:45 -07:00
elf.c bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym 2020-11-20 13:34:07 +00:00
elfcode.h PR26574, heap buffer overflow in _bfd_elf_slurp_secondary_reloc_section 2020-09-04 19:29:02 +09:30
elfcore.h
elflink.c bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym 2020-11-20 13:34:07 +00:00
elfn32-mips.c MIPS/LD: Set symtab's `sh_info' correctly for IRIX emulations 2020-07-29 20:56:41 +01:00
elfnn-aarch64.c aarch64: Return an error on conditional branch to an undefined symbol 2020-09-10 21:42:37 +05:30
elfnn-ia64.c PR26459 UBSAN: elfnn-ia64.c:1945 null pointer bsearch 2020-08-29 13:16:42 +09:30
elfnn-riscv.c RISC-V: Fix that IRELATIVE relocs may be inserted to the wrong place. 2020-10-16 10:11:23 +08:00
elfxx-aarch64.c
elfxx-aarch64.h
elfxx-ia64.c PR26461 UBSAN: elfxx-ia64.c:747 cannot be represented 2020-08-31 20:28:10 +09:30
elfxx-ia64.h
elfxx-mips.c PR26476, PR26477 UBSAN: elfxx-mips.c:2695,5370 cannot be represented 2020-08-31 20:28:10 +09:30
elfxx-mips.h
elfxx-riscv.c RISC-V: Support GNU indirect functions. 2020-10-16 10:11:18 +08:00
elfxx-riscv.h RISC-V: Report warning when linking the objects with different priv specs. 2020-06-22 10:01:14 +08:00
elfxx-sparc.c Skip IFUNC relocations in debug sections ignored by ld.so. Fixes some ld test failures on sparc-linux-gnu. 2020-09-17 10:45:39 +01:00
elfxx-sparc.h elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elfxx-target.h MIPS/LD: Set symtab's `sh_info' correctly for IRIX emulations 2020-07-29 20:56:41 +01:00
elfxx-tilegx.c elf_hash_table_id access 2020-08-25 02:45:58 +09:30
elfxx-tilegx.h
elfxx-x86.c x86: Support GNU_PROPERTY_X86_ISA_1_BASELINE marker 2020-10-30 06:50:10 -07:00
elfxx-x86.h elf: Add sym_cache to elf_link_hash_table 2020-07-30 03:41:44 -07:00
format.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
gen-aout.c
genlink.h
go32stub.h
hash.c Allow larger bfd_default_hash_table_size 2020-08-14 21:37:24 +09:30
host-aout.c
hppabsd-core.c
hpux-core.c
i386aout.c This patch set for the generic BFD a.out backend removes a dead #define and makes aoutx.h self-contained: [PATCH 1/2]: bfd: remove unused NO_WRITE_HEADER_KLUDGE #define [PATCH 2/2]: bfd: make aoutx.h self-contained 2020-06-03 15:24:58 +01:00
i386bsd.c
i386lynx.c
i386msdos.c
ihex.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
init.c
irix-core.c
libaout.h This patch set for the generic BFD a.out backend removes a dead #define and makes aoutx.h self-contained: [PATCH 1/2]: bfd: remove unused NO_WRITE_HEADER_KLUDGE #define [PATCH 2/2]: bfd: make aoutx.h self-contained 2020-06-03 15:24:58 +01:00
libbfd-in.h Re: MSP430: Support relocations for subtract expressions in .uleb128 directives 2020-09-09 08:41:28 +09:30
libbfd.c MSP430: Support relocations for subtract expressions in .uleb128 directives 2020-09-08 16:18:38 +01:00
libbfd.h Re: MSP430: Support relocations for subtract expressions in .uleb128 directives 2020-09-09 08:41:28 +09:30
libcoff-in.h Remove powerpc PE support 2020-07-09 22:58:16 +09:30
libcoff.h Remove powerpc PE support 2020-07-09 22:58:16 +09:30
libecoff.h
libhppa.h
libpei.h
libxcoff.h
linker.c Prevent the linker from overestimating the alignment requirement of common symbols on targets with octets that are larger than one byte. 2020-08-28 13:27:16 +01:00
lynx-core.c
mach-o-aarch64.c
mach-o-arm.c
mach-o-i386.c
mach-o-target.c
mach-o-x86-64.c
mach-o.c Recognize some new Mach-O load commands 2020-06-22 14:29:20 +01:00
mach-o.h
MAINTAINERS
Makefile.am Unify Solaris procfs and largefile handling 2020-07-30 15:41:50 +02:00
Makefile.in Unify Solaris procfs and largefile handling 2020-07-30 15:41:50 +02:00
makefile.vms
mep-relocs.pl PR26466 UBSAN: elf32-mep.c:300 left shift of negative value 2020-08-31 20:28:10 +09:30
merge.c
mmo.c PR26478 UBSAN: mmo.c:2941 null pointer memcpy 2020-08-26 23:23:45 +09:30
netbsd-core.c
netbsd.h
ns32k.h
ns32knetbsd.c
opncls.c Re: PR25993, read of freed memory 2020-05-21 23:39:36 +09:30
osf-core.c
pc532-mach.c
pdp11.c PR26107, Compilation failure in pdp11.c 2020-06-11 15:50:33 +09:30
pe-arm-wince.c
pe-arm.c
pe-i386.c
pe-mcore.c
pe-sh.c
pe-x86_64.c
pef-traceback.h
pef.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
pef.h
pei-arm-wince.c
pei-arm.c
pei-i386.c
pei-ia64.c
pei-mcore.c
pei-sh.c
pei-x86_64.c
peicode.h PR26069, strip/objcopy misaligned address accesses 2020-06-03 17:59:44 +09:30
peXXigen.c fix objcopy of PE images with .buildid section 2020-08-21 10:28:35 +02:00
plugin.c Stop the plugin handler from ignoring unknown symbol types when conanicalizing weak definitions. 2020-09-08 09:49:15 +01:00
plugin.h
PORTING
ppcboot.c
ptrace-core.c
README
reloc16.c
reloc.c elf/x86-64: Adjust relocation for PE/x86-64 inputs 2020-09-16 07:11:31 -07:00
rs6000-core.c
sco5-core.c
section.c
simple.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
som.c Fix PR binutils/26356 on hppa*-*-hpux*. 2020-08-27 15:25:03 +00:00
som.h
srec.c Fix a potential illegal memory access when creating an srec format file. 2020-10-28 11:07:02 +00:00
stab-syms.c
stabs.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
stamp-h.in
syms.c PR26389, nm prints "c" for a common symbol with -flto and -fcommon 2020-08-15 14:16:02 +09:30
sysdep.h Fix Windows-x-PPC build 2020-11-11 06:38:43 -07:00
targets.c PR26667, Add powerpc64le-*-freebsd* support 2020-10-06 17:09:27 +10:30
targmatch.sed
tekhex.c
TODO
trad-core.c
vax1knetbsd.c
vaxnetbsd.c
verilog.c Oops - failed to commit change to verilog.c. Trying again. 2020-09-16 16:19:53 +01:00
version.h Automatic date update in version.in 2020-11-20 00:00:20 +00:00
version.m4 Update version to 2.35.50 and regenerate files 2020-07-04 10:34:23 +01:00
vms-alpha.c asan: vms-alpha: stack buffer overflow 2020-11-09 23:27:46 +10:30
vms-lib.c asan: alpha-vms: buffer overflow in vms_traverse_index 2020-08-03 23:18:34 +09:30
vms-misc.c asan: alpha-vms: buffer overflow 2020-10-25 22:25:45 +10:30
vms.h
warning.m4
wasm-module.c
wasm-module.h
xcofflink.c heap use after free in xcoff_archive_info_eq 2020-09-03 11:04:46 +09:30
xcofflink.h
xsym.c
xsym.h
xtensa-isa.c Replace "if (x) free (x)" with "free (x)", bfd 2020-05-21 10:11:57 +09:30
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-2020 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.