2021-12-08 02:29:01 +08:00
|
|
|
|
2021-12-07 John Baldwin <jhb@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (AT_FREEBSD_FXRNG, AT_FREEBSD_KPRELOAD): Define.
|
|
|
|
|
|
2021-12-01 19:29:34 +08:00
|
|
|
|
2021-12-01 Nick Clifton <nickc@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR 28630
|
|
|
|
|
* coff/internal.h (x_n): Use bfd_hostptr_t for the fields in this
|
|
|
|
|
structure.
|
|
|
|
|
|
2021-09-29 05:11:42 +08:00
|
|
|
|
2021-11-25 Andrew Burgess <aburgess@redhat.com>
|
|
|
|
|
Simon Cook <simon.cook@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* dis-asm.h (disassembler_options_riscv): Declare.
|
|
|
|
|
|
2021-11-17 05:03:57 +08:00
|
|
|
|
2021-11-16 Fangrui Song <maskray@google.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (DT_ENCODING): Bump to 38.
|
|
|
|
|
* elf/external.h (Elf32_External_Relr): New.
|
|
|
|
|
(Elf64_External_Relr): New.
|
|
|
|
|
|
2021-09-07 21:41:01 +08:00
|
|
|
|
2021-09-07 Luis Machado <luis.machado@linaro.org>
|
|
|
|
|
|
|
|
|
|
Revert: [AArch64] MTE corefile support
|
|
|
|
|
|
|
|
|
|
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (NT_MEMTAG): New constant.
|
|
|
|
|
(NT_MEMTAG_TYPE_AARCH_MTE): New constant.
|
|
|
|
|
|
2021-07-03 21:50:57 +08:00
|
|
|
|
2021-07-03 Nick Clifton <nickc@redhat.com>
|
|
|
|
|
|
|
|
|
|
* 2.37 release branch created.
|
|
|
|
|
|
2021-07-03 21:00:33 +08:00
|
|
|
|
2021-07-03 Nick Clifton <nickc@redhat.com>
|
|
|
|
|
|
|
|
|
|
Import from gcc mainline:
|
|
|
|
|
2021-03-31 Patrick Palka <ppalka@redhat.com>
|
|
|
|
|
|
|
|
|
|
PR c++/88115
|
|
|
|
|
* demangle.h (enum demangle_component_type): Add
|
|
|
|
|
DEMANGLE_COMPONENT_VENDOR_EXPR.
|
|
|
|
|
|
2021-06-27 13:37:24 +08:00
|
|
|
|
2021-07-01 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* opcode/aarch64.h (aarch64_opcode_table): Mark const.
|
|
|
|
|
|
2021-07-01 18:37:13 +08:00
|
|
|
|
2021-07-01 Richard Earnshaw <rearnsha@arm.com>
|
|
|
|
|
|
|
|
|
|
PR gas/28031
|
|
|
|
|
* opcode/arm.h (FPU_ANY): Exclude XScale-related features.
|
|
|
|
|
|
elf: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX
Implement GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX:
https://sourceware.org/pipermail/gnu-gabi/2021q1/000467.html
1. GNU_PROPERTY_UINT32_AND_LO..GNU_PROPERTY_UINT32_AND_HI
#define GNU_PROPERTY_UINT32_AND_LO 0xb0000000
#define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff
A bit in the output pr_data field is set only if it is set in all
relocatable input pr_data fields. If all bits in the the output
pr_data field are zero, this property should be removed from output.
If the bit is 1, all input relocatables have the feature. If the
bit is 0 or the property is missing, the info is unknown.
2. GNU_PROPERTY_UINT32_OR_LO..GNU_PROPERTY_UINT32_OR_HI
#define GNU_PROPERTY_UINT32_OR_LO 0xb0008000
#define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff
A bit in the output pr_data field is set if it is set in any
relocatable input pr_data fields. If all bits in the the output
pr_data field are zero, this property should be removed from output.
If the bit is 1, some input relocatables have the feature. If the
bit is 0 or the property is missing, the info is unknown.
bfd/
* elf-properties.c (_bfd_elf_parse_gnu_properties): Handle
GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
(elf_merge_gnu_properties): Likewise.
binutils/
* readelf.c (print_gnu_property_note): Handle
GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
include/
* elf/common.h (GNU_PROPERTY_UINT32_AND_LO): New.
(GNU_PROPERTY_UINT32_AND_HI): Likewise.
(GNU_PROPERTY_UINT32_OR_LO): Likewise.
(GNU_PROPERTY_UINT32_OR_HI): Likewise.
ld/
* testsuite/ld-elf/property-and-1.d: New file.
* testsuite/ld-elf/property-and-1.s: Likewise.
* testsuite/ld-elf/property-and-2.d: Likewise.
* testsuite/ld-elf/property-and-2.s: Likewise.
* testsuite/ld-elf/property-and-3.d: Likewise.
* testsuite/ld-elf/property-and-3.s: Likewise.
* testsuite/ld-elf/property-and-4.d: Likewise.
* testsuite/ld-elf/property-and-empty.s: Likewise.
* testsuite/ld-elf/property-or-1.d: Likewise.
* testsuite/ld-elf/property-or-1.s: Likewise.
* testsuite/ld-elf/property-or-2.d: Likewise.
* testsuite/ld-elf/property-or-2.s: Likewise.
* testsuite/ld-elf/property-or-3.d: Likewise.
* testsuite/ld-elf/property-or-3.s: Likewise.
* testsuite/ld-elf/property-or-4.d: Likewise.
* testsuite/ld-elf/property-or-empty.s: Likewise.
2021-06-18 22:18:02 +08:00
|
|
|
|
2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (GNU_PROPERTY_UINT32_AND_LO): New.
|
|
|
|
|
(GNU_PROPERTY_UINT32_AND_HI): Likewise.
|
|
|
|
|
(GNU_PROPERTY_UINT32_OR_LO): Likewise.
|
|
|
|
|
(GNU_PROPERTY_UINT32_OR_HI): Likewise.
|
|
|
|
|
|
2021-06-15 18:43:43 +08:00
|
|
|
|
2021-06-15 Nick Clifton <nickc@redhat.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (NT_GO_BUILDID): Define.
|
|
|
|
|
|
2021-06-02 20:30:16 +08:00
|
|
|
|
2021-06-02 Shahab Vahedi <shahab@synopsys.com>
|
|
|
|
|
|
|
|
|
|
* dis-asm.h (disassembler_options_arc): New prototype.
|
|
|
|
|
|
2021-05-29 09:26:32 +08:00
|
|
|
|
2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
|
|
|
|
|
|
|
|
|
|
* opcode/mips.h (cpu_is_member): Remove code for MIPSr6 ISA
|
|
|
|
|
exclusion.
|
|
|
|
|
(opcode_is_member): Handle ISA level exclusion.
|
|
|
|
|
|
2021-05-29 09:26:32 +08:00
|
|
|
|
2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
|
|
|
|
|
|
|
|
|
|
* opcode/mips.h (isa_is_member): New inline function, factored
|
|
|
|
|
out from...
|
|
|
|
|
(opcode_is_member): ... here.
|
|
|
|
|
|
MIPS/opcodes: Do not use CP0 register names for control registers
The CP0 control register set has never been defined, however encodings
for the CFC0 and CTC0 instructions remained available for implementers
up until the MIPS32 ISA declared them invalid and causing the Reserved
Instruction exception[1]. Therefore we handle them for both assembly
and disassembly, however in the latter case the names of CP0 registers
from the regular set are incorrectly printed if named registers are
requested. This is because we do not define separate operand classes
for coprocessor regular and control registers respectively, which means
the disassembler has no way to tell the two cases apart. Consequently
nonsensical disassembly is produced like:
cfc0 v0,c0_random
Later the MIPSr5 ISA reused the encodings for XPA ASE MFHC0 and MTHC0
instructions[2] although it failed to document them in the relevant
opcode table until MIPSr6 only.
Correct the issue then by defining a new register class, OP_REG_CONTROL,
and corresponding operand codes, `g' and `y' for the two positions in
the machine instruction a control register operand can take. Adjust the
test cases affected accordingly.
While at it swap the regular MIPS opcode table "cfc0" and "ctc0" entries
with each other so that they come in the alphabetical order.
References:
[1] "MIPS32 Architecture For Programmers, Volume II: The MIPS32
Instruction Set", MIPS Technologies, Inc., Document Number: MD00086,
Revision 1.00, August 29, 2002, Table A-9 "MIPS32 COP0 Encoding of
rs Field", p. 242
[2] "MIPS Architecture For Programmers, Volume II-A: The MIPS32
Instruction Set", MIPS Technologies, Inc., Document Number: MD00086,
Revision 5.04, December 11, 2013, Section 3.2 "Alphabetical List of
Instructions", pp. 195, 216
include/
* opcode/mips.h: Document `g' and `y' operand codes.
(mips_reg_operand_type): Add OP_REG_CONTROL enumeration
constant.
gas/
* tc-mips.c (convert_reg_type) <OP_REG_CONTROL>: New case.
(macro) <M_TRUNCWS, M_TRUNCWD>: Use the `g' rather than `G'
operand code.
opcodes/
* mips-dis.c (print_reg) <OP_REG_COPRO>: Move control register
handling code over to...
<OP_REG_CONTROL>: ... this new case.
* mips-opc.c (decode_mips_operand) <'g', 'y'>: New cases.
(mips_builtin_opcodes): Update "cfc1", "ctc1", "cttc1", "cttc2",
"cfc0", "ctc0", "cfc2", "ctc2", "cfc3", and "ctc3" entries
replacing the `G' operand code with `g'. Update "cftc1" and
"cftc2" entries replacing the `E' operand code with `y'.
* micromips-opc.c (decode_micromips_operand) <'g'>: New case.
(micromips_opcodes): Update "cfc1", "cfc2", "ctc1", and "ctc2"
entries replacing the `G' operand code with `g'.
binutils/
* testsuite/binutils-all/mips/mips-xpa-virt-1.d: Correct CFC0
operand disassembly.
* testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
2021-05-29 09:26:32 +08:00
|
|
|
|
2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
|
|
|
|
|
|
|
|
|
|
* opcode/mips.h: Document `g' and `y' operand codes.
|
|
|
|
|
(mips_reg_operand_type): Add OP_REG_CONTROL enumeration
|
|
|
|
|
constant.
|
|
|
|
|
|
MIPS/opcodes: Free up redundant `g' operand code
In the operand handling rewrite made for the MIPS disassembler with
commit ab90248154ba ("Add structures to describe MIPS operands"),
<https://sourceware.org/ml/binutils/2013-07/msg00135.html>, the `g'
operand code has become redundant for the regular MIPS instruction set
by duplicating the OP_REG_COPRO semantics of the `G' operand code.
Later commit 351cdf24d223 ("Implement O32 FPXX, FP64 and FP64A ABI
extensions") converted the CTTC1 instruction from the `g' to the `G'
operand code, but still left a few instructions behind.
Convert the three remaining instructions still using the `g' code then,
namely: CTTC2, MTTC2 and MTTHC2, and remove all traces of the operand
code, freeing it up for other use.
opcodes/
* mips-opc.c (mips_builtin_opcodes): Switch "cttc2", "mttc2",
and "mtthc2" to using the `G' rather than `g' operand code for
the coprocessor control register referred.
include/
* opcode/mips.h: Complement change made to opcodes and remove
references to the `g' regular MIPS ISA operand code.
2021-05-29 09:26:32 +08:00
|
|
|
|
2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
|
|
|
|
|
|
|
|
|
|
* opcode/mips.h: Complement change made to opcodes and remove
|
|
|
|
|
references to the `g' regular MIPS ISA operand code.
|
|
|
|
|
|
2021-05-29 00:34:10 +08:00
|
|
|
|
2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/27905
|
|
|
|
|
* elf/common.h (GNU_PROPERTY_X86_FEATURE_2_CODE16): Removed.
|
|
|
|
|
|
2021-05-27 03:13:13 +08:00
|
|
|
|
2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/27905
|
|
|
|
|
* elf/common.h (GNU_PROPERTY_X86_FEATURE_2_CODE16): New.
|
|
|
|
|
|
2021-05-23 10:16:36 +08:00
|
|
|
|
2021-05-23 Tiezhu Yang <yangtiezhu@loongson.cn>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (EM_LOONGARCH): Change Loongson Loongarch to
|
|
|
|
|
LoongArch.
|
|
|
|
|
|
2021-05-21 17:40:32 +08:00
|
|
|
|
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (NT_MEMTAG): New constant.
|
|
|
|
|
(NT_MEMTAG_TYPE_AARCH_MTE): New constant.
|
|
|
|
|
|
2021-05-07 22:29:49 +08:00
|
|
|
|
2021-05-07 Clément Chigot <clement.chigot@atos.net>
|
|
|
|
|
|
|
|
|
|
* coff/internal.h (C_DWARF): New define.
|
|
|
|
|
* coff/xcoff.h (SSUBTYP_DWLOC, SSUBTYP_DWFRAME,
|
|
|
|
|
SSUBTYP_DWMAC): New defines.
|
|
|
|
|
|
2021-05-06 19:51:24 +08:00
|
|
|
|
2021-05-06 Stafford Horne <shorne@gmail.com>
|
|
|
|
|
|
|
|
|
|
PR 21464
|
|
|
|
|
* elf/or1k.h (elf_or1k_reloc_type): Define R_OR1K_GOT_AHI16 number.
|
|
|
|
|
|
libctf, include: support an alternative encoding for nonrepresentable types
Before now, types that could not be encoded in CTF were represented as
references to type ID 0, which does not itself appear in the
dictionary. This choice is annoying in several ways, principally that it
forces generators and consumers of CTF to grow special cases for types
that are referenced in valid dicts but don't appear.
Allow an alternative representation (which will become the only
representation in format v4) whereby nonrepresentable types are encoded
as actual types with kind CTF_K_UNKNOWN (an already-existing kind
theoretically but not in practice used for padding, with value 0).
This is backward-compatible, because CTF_K_UNKNOWN was not used anywhere
before now: it was used in old-format function symtypetabs, but these
were never emitted by any compiler and the code to handle them in libctf
likely never worked and was removed last year, in favour of new-format
symtypetabs that contain only type IDs, not type kinds.
In order to link this type, we need an API addition to let us add types
of unknown kind to the dict: we let them optionally have names so that
GCC can emit many different unknown types and those types with identical
names will be deduplicated together. There are also small tweaks to the
deduplicator to actually dedup such types, to let opening of dicts with
unknown types with names work, to return the ECTF_NONREPRESENTABLE error
on resolution of such types (like ID 0), and to print their names as
something useful but not a valid C identifier, mostly for the sake of
the dumper.
Tests added in the next commit.
include/ChangeLog
2021-05-06 Nick Alcock <nick.alcock@oracle.com>
* ctf.h (CTF_K_UNKNOWN): Document that it can be used for
nonrepresentable types, not just padding.
* ctf-api.h (ctf_add_unknown): New.
libctf/ChangeLog
2021-05-06 Nick Alcock <nick.alcock@oracle.com>
* ctf-open.c (init_types): Unknown types may have names.
* ctf-types.c (ctf_type_resolve): CTF_K_UNKNOWN is as
non-representable as type ID 0.
(ctf_type_aname): Print unknown types.
* ctf-dedup.c (ctf_dedup_hash_type): Do not early-exit for
CTF_K_UNKNOWN types: they have real hash values now.
(ctf_dedup_rwalk_one_output_mapping): Treat CTF_K_UNKNOWN types
like other types with no referents: call the callback and do not
skip them.
(ctf_dedup_emit_type): Emit via...
* ctf-create.c (ctf_add_unknown): ... this new function.
* libctf.ver (LIBCTF_1.2): Add it.
2021-05-06 16:30:58 +08:00
|
|
|
|
2021-05-06 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf.h (CTF_K_UNKNOWN): Document that it can be used for
|
|
|
|
|
nonrepresentable types, not just padding.
|
|
|
|
|
* ctf-api.h (ctf_add_unknown): New.
|
|
|
|
|
|
2021-04-22 19:28:50 +08:00
|
|
|
|
2021-04-22 Clément Chigot <clement.chigot@atos.net>
|
|
|
|
|
|
|
|
|
|
* coff/internal.h (union internal_auxent):
|
|
|
|
|
Add x_sect structure.
|
|
|
|
|
* coff/rs6000.h (union external_auxent): Rework to
|
|
|
|
|
match official documentation.
|
|
|
|
|
* coff/rs6k64.h (union external_auxent): Likewise.
|
|
|
|
|
(_AUX_SECT): New define.
|
|
|
|
|
|
2021-04-22 00:38:52 +08:00
|
|
|
|
2021-04-21 Eli Zaretskii <eliz@gnu.org>
|
|
|
|
|
|
|
|
|
|
PR 27760
|
|
|
|
|
* coff/pe.h (IMAGE_DLLCHARACTERISTICS_APPCONTAINER): Define.
|
|
|
|
|
(IMAGE_DLLCHARACTERISTICS_GUARD_CF): Define.
|
|
|
|
|
|
2021-04-16 20:59:05 +08:00
|
|
|
|
2021-04-16 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
PR 27567
|
|
|
|
|
* coff/internal.h (struct internal_scnhdr): Make s_flags unsigned long.
|
|
|
|
|
* coff/pe.h (COFF_ENCODE_ALIGNMENT): Don't set align flags for an
|
|
|
|
|
executable and return false. Do so for a relocatable object and
|
|
|
|
|
evaluate to true.
|
|
|
|
|
* coff/ti.h (COFF_ENCODE_ALIGNMENT): Add bfd arg and evaluate to true.
|
|
|
|
|
(COFF_DECODE_ALIGNMENT): Formatting.
|
|
|
|
|
* coff/z80.h (COFF_ENCODE_ALIGNMENT): Similarly.
|
|
|
|
|
(COFF_DECODE_ALIGNMENT): Similarly.
|
|
|
|
|
|
2021-04-06 17:33:35 +08:00
|
|
|
|
2021-04-09 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* dis-asm.h (struct disassemble_info): Add dynrelbuf and dynrelcount.
|
|
|
|
|
|
2021-04-06 17:27:04 +08:00
|
|
|
|
2021-04-06 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* dis-asm.h (struct disassemble_info <symbol_at_address_func>):
|
|
|
|
|
Return asymbol*.
|
|
|
|
|
|
2021-03-22 21:56:16 +08:00
|
|
|
|
2021-04-01 Martin Liska <mliska@suse.cz>
|
|
|
|
|
|
|
|
|
|
* opcode/cr16.h (strneq): Remove strneq and use startswith.
|
|
|
|
|
|
2021-03-31 07:50:10 +08:00
|
|
|
|
2021-03-31 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* bfdlink.h: Replace bfd_boolean with bool throughout.
|
|
|
|
|
* coff/ecoff.h: Likewise.
|
|
|
|
|
* coff/xcoff.h: Likewise.
|
|
|
|
|
* dis-asm.h: Likewise.
|
|
|
|
|
* elf/mmix.h: Likewise.
|
|
|
|
|
* elf/xtensa.h: Likewise.
|
|
|
|
|
* opcode/aarch64.h: Likewise, and FALSE with false, TRUE with true.
|
|
|
|
|
* opcode/arc.h: Likewise.
|
|
|
|
|
* opcode/mips.h: Likewise.
|
|
|
|
|
* opcode/tic6x-opcode-table.h: Likewise.
|
|
|
|
|
* opcode/tic6x.h: Likewise.
|
|
|
|
|
|
2021-03-31 07:37:02 +08:00
|
|
|
|
2021-03-31 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* cgen/basic-modes.h: Include stdint.h in place of bfd_stdint.h.
|
|
|
|
|
* elf/nfp.h: Likewise.
|
|
|
|
|
* opcode/aarch64.h: Likewise.
|
|
|
|
|
* opcode/cgen.h: Likewise.
|
|
|
|
|
* opcode/nfp.h: Likewise.
|
|
|
|
|
* opcode/ppc.h: Likewise.
|
|
|
|
|
|
TRUE/FALSE simplification
There is really no need to write code like "foo != 0 ? TRUE : FALSE"
unless we had stupidly defined FALSE as something other than 0 or TRUE
as something other than 1. The simpler "foo != 0" does just as well.
Similarly "(condition == TRUE)" or "(condition == FALSE) can be
simplified to "(condition)" and "(!condition)" respectively.
I'll note that there is reason to use "integer_expression != 0" when
assigning a bfd_boolean rather than the simpler "integer_expression",
if you expect the variable to have 0 or 1 value. It's probably even a
good idea to not rely on implicit conversion if bfd_boolean were _Bool.
bfd/
* aoutx.h (aout_link_write_symbols): Don't cast boolean expression
to bfd_boolean.
* elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans
against FALSE.
* elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE.
(is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE".
(is_reloc_SDA_relative, is_reloc_for_GOT): Likewise.
(is_reloc_for_PLT, is_reloc_for_TLS): Likewise.
* elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise.
* elf32-nds32.c (insert_nds32_elf_blank): Likewise.
* elf32-rx.c (rx_set_section_contents): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
* elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise.
* mach-o.c (bfd_mach_o_read_command): Likewise.
* targets.c (bfd_get_target_info): Likewise.
binutils/
* dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
* dwarf.c (read_and_display_attr_value): Likewise.
(display_debug_str_offsets): Likewise.
* objdump.c (dump_bfd): Likewise.
* readelf.c (dump_section_as_strings): Likewise.
(dump_section_as_bytes): Likewise.
gas/
* atof-generic.c (FALSE, TRUE): Don't define.
* config/obj-elf.h (FALSE, TRUE): Don't define.
* config/obj-som.h (FALSE, TRUE): Don't define.
* config/tc-hppa.h (FALSE, TRUE): Don't define.
* config/tc-pdp11.c (FALSE, TRUE): Don't define.
* config/tc-iq2000.h (obj_fix_adjustable): Delete.
* config/tc-m32r.h (TC_FIX_ADJUSTABLE): Delete.
* config/tc-mt.h (obj_fix_adjustable): Delete.
* config/tc-nds32.h (TC_FIX_ADJUSTABLE): Delete.
* config/tc-arc.c (parse_opcode_flags): Simplify boolean expression.
(relaxable_flag, relaxable_operand, assemble_insn): Likewise.
(tokenize_extregister): Likewise.
* config/tc-csky.c (parse_opcode, get_operand_value): Likewise.
(parse_operands_op, parse_operands, md_assemble): Likewise.
* config/tc-d10v.c (build_insn): Likewise.
* config/tc-score.c (s3_gen_insn_frag): Likewise.
* config/tc-score7.c (s7_gen_insn_frag, s7_relax_frag): Likewise.
* config/tc-tic6x.c (tic6x_update_features, md_assemble): Likewise.
* config/tc-z80.c (emit_byte): Likewise.
include/
* opcode/aarch64.h (alias_opcode_p): Simplify boolean expression.
(opcode_has_alias, pseudo_opcode_p, optional_operand_p): Likewise.
(opcode_has_special_coder): Likewise.
ld/
* emultempl/aix.em (gld${EMULATION_NAME}_before_allocation): Simplify
boolean expression.
* lexsup.c (parse_args): Likewise.
* pe-dll.c (pe_dll_id_target): Likewise.
opcodes/
* aarch64-opc.c (vector_qualifier_p): Simplify boolean expression.
(fp_qualifier_p, get_data_pattern): Likewise.
(aarch64_get_operand_modifier_from_value): Likewise.
(aarch64_extend_operator_p, aarch64_shift_operator_p): Likewise.
(operand_variant_qualifier_p): Likewise.
(qualifier_value_in_range_constraint_p): Likewise.
(aarch64_get_qualifier_esize): Likewise.
(aarch64_get_qualifier_nelem): Likewise.
(aarch64_get_qualifier_standard_value): Likewise.
(get_lower_bound, get_upper_bound): Likewise.
(aarch64_find_best_match, match_operands_qualifier): Likewise.
(aarch64_print_operand): Likewise.
* aarch64-opc.h (operand_has_inserter, operand_has_extractor): Likewise.
(operand_need_sign_extension, operand_need_shift_by_two): Likewise.
(operand_need_shift_by_four, operand_maybe_stack_pointer): Likewise.
* arm-dis.c (print_insn_mve, print_insn_thumb32): Likewise.
* tic6x-dis.c (tic6x_check_fetch_packet_header): Likewise.
(print_insn_tic6x): Likewise.
2021-03-29 07:22:56 +08:00
|
|
|
|
2021-03-29 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* opcode/aarch64.h (alias_opcode_p): Simplify boolean expression.
|
|
|
|
|
(opcode_has_alias, pseudo_opcode_p, optional_operand_p): Likewise.
|
|
|
|
|
(opcode_has_special_coder): Likewise.
|
|
|
|
|
|
2021-03-29 07:14:48 +08:00
|
|
|
|
2021-03-29 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* opcode/aarch64.h (aarch64_opcode_encode): Correct prototype.
|
|
|
|
|
|
2021-03-26 00:32:46 +08:00
|
|
|
|
2021-03-25 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
PR libctf/27628
|
|
|
|
|
* ctf-api.h: Fix some indentation.
|
|
|
|
|
(CTF_SET_STID): Always do an unsigned shift, even if STID is
|
|
|
|
|
signed.
|
|
|
|
|
|
2021-03-19 20:58:31 +08:00
|
|
|
|
2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (EM_INTEL205): Renamed to ...
|
|
|
|
|
(EM_INTELGT): This.
|
|
|
|
|
|
2021-03-16 20:44:50 +08:00
|
|
|
|
2021-03-16 Nick Clifton <nickc@redhat.com>
|
|
|
|
|
|
|
|
|
|
* coff/internal.h (struct internal_auxent): Fix a couple of typos
|
|
|
|
|
in comment describing the x_fname field.
|
|
|
|
|
|
2021-02-24 13:26:29 +08:00
|
|
|
|
2021-03-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
|
|
|
|
|
|
|
|
|
|
* opcode/riscv-opc.h: Support zba, zbb and zbc extensions.
|
|
|
|
|
* opcode/riscv.h (riscv_insn_class): Add INSN_CLASS_ZB*.
|
|
|
|
|
|
2021-03-12 22:37:51 +08:00
|
|
|
|
2021-03-12 Frederic Cambus <fred@statdns.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (NT_NETBSD_PAX, NT_NETBSD_PAX_MPROTECT)
|
|
|
|
|
(NT_NETBSD_PAX_NOMPROTECT, NT_NETBSD_PAX_GUARD, NT_NETBSD_PAX_NOGUARD)
|
|
|
|
|
(NT_NETBSD_PAX_ASLR, NT_NETBSD_PAX_NOASLR): Define.
|
|
|
|
|
|
aix: implement TLS relocation for gas and ld
Add support for TLS in XCOFF. Amongst the things done by this commit:
- Update XCOFF auxialiary header to match new version and allow TLS
sections.
- Add TLS sections (.tdata and .tbss) support in gas and ld.
- Add support for the TLS relocations in gas and ld.
Two different types BFD_RELOC are created for PPC and PPC64 as
the size is a pointer, thus distinct in 32 or 64bit.
The addresses given by ld to .tdata and .tbss is a bit special. In
XCOFF, these addresses are actually offsets from the TLS pointer
computed at runtime. AIX assembly and linker does the same. In
top of that, the .tdata must be before .data (this is mandatory for AIX
loader). Thus, the aix ld script is recomputing "." before .data to restore
its original value. There might be a simpler way, but this one is working.
Optimisation linked to TLS relocations aren't yet implemented.
bfd/
* reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE,
BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD,
BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE,
BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M,
BFD_RELOC_PPC64_TLS_ML): New relocations.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* coff-rs6000.c (xcoff_calculate_relocation): Call
xcoff_reloc_type_tls for TLS relocations.
(xcoff_howto_table): Implement TLS relocations.
(_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations.
(xcoff_reloc_type_tls): New function.
* coff64-rs6000.c (xcoff_calculate_relocation): Likewise.
(xcoff_howto_table): Likewise.
(_bfd_xcoff_reloc_type_lookup): Likewise.
* coffcode.h (sec_to_styp_flags): Handle TLS sections.
(styp_to_sec_flags): Likewise.
(coff_compute_section_file_positions): Avoid file offset
optimisation for .data when the previous section is .tdata.
(coff_write_object_contents): Handle TLS sections.
* coffswap.h (coff_swap_aouthdr_out): Add support for
new fields in aouthdr.
* libxcoff.h (xcoff_reloc_type_tls): Add prototype.
* xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL.
(xcoff_need_ldrel_p): Add cases for TLS relocations.
(xcoff_create_ldrel): Add l_symndx for TLS sections.
gas/
* config/tc-ppc.c (ppc_xcoff_text_section, ppc_xcoff_data_section,
(ppc_xcoff_bss_section, ppc_xcoff_tdata_section,
(ppc_xcoff_tbss_section): New variables.
(ppc_text_subsegment, ppc_text_csects, ppc_data_subgments,
(ppc_data_csects): Removed.
(ppc_xcoff_section_is_initialized, ppc_init_xcoff_section,
ppc_xcoff_parse_cons): New functions.
(md_being): Initialize XCOFF sections.
(ppc_xcoff_suffix): Add support for TLS relocations
(fixup_size, md_apply_fix): Add support for new BFD_RELOC.
(ppc_change_csect): Handle XMC_TL, XMC_UL. Correctly, add XMC_BS
to .bss section. Handle new XCOFF section variables.
(ppc_comm): Likewise.
(ppc_toc): Likewise.
(ppc_symbol_new_hook): Likewise.
(ppc_frob_symbol): Likewise.
(ppc_fix_adjustable): Add tbss support.
* config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): New define.
(ppc_xcoff_parse_cons): Add prototype.
(struct ppc_xcoff_section): New structure.
ld/
* emultempl/aix.em: Ensure .tdata section is removed
if empty, even with -r flag.
* scripttempl/aix.sc: Handle TLS sections.
* testsuite/ld-powerpc/aix52.exp: Add new tests.
* testsuite/ld-powerpc/aix-tls-reloc-32.d: New test.
* testsuite/ld-powerpc/aix-tls-reloc-64.d: New test.
* testsuite/ld-powerpc/aix-tls-reloc.ex: New test.
* testsuite/ld-powerpc/aix-tls-reloc.s: New test.
* testsuite/ld-powerpc/aix-tls-section-32.d: New test.
* testsuite/ld-powerpc/aix-tls-section-64.d: New test.
* testsuite/ld-powerpc/aix-tls-section.ex: New test.
* testsuite/ld-powerpc/aix-tls-section.s: New test.
include/
* coff/internal.h (struct internal_aouthdr): Add new fields.
* coff/rs6000.h (AOUTHDRÃ): Add new fields.
* coff/rs6k64.h (struct external_filehdr): Likewise.
* coff/xcoff.h (_TDATA), _TBSS): New defines
(RS6K_AOUTHDR_TLS_LE, RS6K_AOUTHDR_RAS, RS6K_AOUTHDR_ALGNTDATA,
RS6K_AOUTHDR_SHR_SYMTAB, RS6K_AOUTHDR_FORK_POLICY,
RS6K_AOUTHDR_FORK_COR): New defines.
(XMC_TU): Removed.
(XMC_UL): New define.
2021-03-11 18:08:19 +08:00
|
|
|
|
2021-03-12 Clément Chigot <clement.chigot@atos.net>
|
|
|
|
|
|
|
|
|
|
* coff/internal.h (struct internal_aouthdr): Add new fields.
|
|
|
|
|
* coff/rs6000.h (AOUTHDRÃ): Add new fields.
|
|
|
|
|
* coff/rs6k64.h (struct external_filehdr): Likewise.
|
|
|
|
|
* coff/xcoff.h (_TDATA), _TBSS): New defines
|
|
|
|
|
(RS6K_AOUTHDR_TLS_LE, RS6K_AOUTHDR_RAS, RS6K_AOUTHDR_ALGNTDATA,
|
|
|
|
|
RS6K_AOUTHDR_SHR_SYMTAB, RS6K_AOUTHDR_FORK_POLICY,
|
|
|
|
|
RS6K_AOUTHDR_FORK_COR): New defines.
|
|
|
|
|
(XMC_TU): Removed.
|
|
|
|
|
(XMC_UL): New define.
|
|
|
|
|
|
2021-03-11 18:08:18 +08:00
|
|
|
|
2021-03-12 Clément Chigot <clement.chigot@atos.net>
|
|
|
|
|
|
|
|
|
|
* coff/xcoff.h (R_RTB): Remove.
|
|
|
|
|
(R_TRL): Fix value.
|
|
|
|
|
|
2020-11-27 22:04:16 +08:00
|
|
|
|
2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
|
|
|
|
|
Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (NT_RISCV_CSR): Define.
|
|
|
|
|
|
bfd/binutils: support for gdb target descriptions in the core file
This commit lays the ground work for allowing GDB to write its target
description into a generated core file.
The goal of this work is to allow a user to connect to a remote
target, capture a core file from within GDB, then pass the executable
and core file to another user and have the user be able to examine the
state of the machine without needing to connect to a running target.
Different remote targets can have different register sets and this
information is communicated from the target to GDB in the target
description.
It is possible for a user to extract the target description from GDB
and pass this along with the core file so that when the core file is
used the target description can be fed back into GDB, however this is
not a great user experience.
It would be nicer, I think, if GDB could write the target description
directly into the core file, and then make use of this description
when loading a core file.
This commit performs the binutils/bfd side of this task, adding the
boiler plate functions to access the target description from within a
core file note, and reserving a new number for a note containing the
target description. Later commits will extend GDB to make use of
this.
The new note is given the name 'GDB' and a type NT_GDB_TDESC. This
should hopefully protect us if there's ever a reuse of the number
assigned to NT_GDB_TDESC by some other core file producer. It should
also, hopefully, make it clearer to users that this note carries GDB
specific information.
bfd/ChangeLog:
* elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
* elf.c (elfcore_grok_gdb_tdesc): New function.
(elfcore_grok_note): Handle NT_GDB_TDESC.
(elfcore_write_gdb_tdesc): New function.
(elfcore_write_register_note): Handle NT_GDB_TDESC.
binutils/ChangeLog:
* readelf.c (get_note_type): Handle NT_GDB_TDESC.
include/ChangeLog:
* elf/common.h (NT_GDB_TDESC): Define.
2020-11-27 23:41:37 +08:00
|
|
|
|
2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
|
|
|
|
|
Andrew Burgess <andrew.burgess@embecosm.com>
|
|
|
|
|
|
|
|
|
|
* elf/common.h (NT_GDB_TDESC): Define.
|
|
|
|
|
|
2021-03-02 09:36:14 +08:00
|
|
|
|
2021-03-03 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* coff/internal.h: Delete obsolete relocation defines. Move used
|
|
|
|
|
relocation defines..
|
|
|
|
|
* coff/i386.h: ..to here..
|
|
|
|
|
* coff/ti.h: ..and here..
|
|
|
|
|
* coff/x86_64.h: ..and here..
|
|
|
|
|
* coff/z80.h: ..and here..
|
|
|
|
|
* coff/z8k.h: ..and here.
|
|
|
|
|
|
libctf, include: remove the nondeduplicating CTF linker
The nondeduplicating CTF linker was kept around when the deduplicating
one was added so that people had something to fall back to in case the
deduplicating linker turned out to be buggy. It's now much more stable
than the nondeduplicating linker, in addition to much faster, using much
less memory and producing much better output. In addition, while
libctf has a linker flag to invoke the nondeduplicating linker, ld does
not expose it: the only way to turn it on within ld is an intentionally-
undocumented environment variable. So we can remove it without any ABI
or user-visibility concerns (the only thing we leave around is the
CTF_LINK_NONDEDUP flag, which can easily be interpreted as "deduplicate
less", though right now it does nothing).
This lets us remove a lot of complexity associated with tracking
filenames and CU names separately (something the deduplcating linker
never bothered with, since the cunames are always reliable and ld never
hands us useful filenames anyway)
The biggest lacuna left behind is the ctf_type_mapping machinery, which
slows down deduplicating links quite a lot. We can't just ditch it
because ctf_add_type uses it: removing the slowdown from the
deduplicating linker is a job for another commit.
include/ChangeLog
2021-03-02 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (CTF_LINK_SHARE_DUPLICATED): Note that this might
merely change how much deduplication is done.
libctf/ChangeLog
2021-03-02 Nick Alcock <nick.alcock@oracle.com>
* ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is
always identical to CUNAME.
(ctf_link_deduplicating_one_symtypetab): Adjust.
(ctf_link_one_type): Remove.
(ctf_link_one_input_archive_member): Likewise.
(ctf_link_close_one_input_archive): Likewise.
(ctf_link_one_input_archive): Likewise.
(ctf_link): No longer call it. Drop CTF_LINK_NONDEDUP path.
Improve header comment a bit (dicts, not files). Adjust
ctf_create_per_cu call.
(ctf_link_deduplicating_variables): Simplify.
(ctf_link_in_member_cb_arg_t) <cu_name>: Remove.
<in_input_cu_file>: Likewise.
<in_fp_parent>: Likewise.
<done_parent>: Likewise.
(ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
2021-03-02 23:10:05 +08:00
|
|
|
|
2021-03-02 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf-api.h (CTF_LINK_SHARE_DUPLICATED): Note that this might
|
|
|
|
|
merely change how much deduplication is done.
|
|
|
|
|
|
2021-03-01 05:52:49 +08:00
|
|
|
|
2021-03-01 Alan Modra <amodra@gmail.com>
|
|
|
|
|
Fangrui Song <maskray@google.com>
|
|
|
|
|
|
|
|
|
|
* bfdlink.h (struct bfd_link_info): Add start_stop_gc.
|
|
|
|
|
|
2021-02-20 13:15:44 +08:00
|
|
|
|
2021-02-21 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* bfdlink.h (struct bfd_link_info): Add warn_multiple_definition.
|
|
|
|
|
|
libctf, include: find types of symbols by name
The existing ctf_lookup_by_symbol and ctf_arc_lookup_symbol functions
suffice to look up the types of symbols if the caller already has a
symbol number. But the caller often doesn't have one of those and only
knows the name of the symbol: also, in object files, the caller might
not have a useful symbol number in any sense (and neither does libctf:
the 'symbol number' we use in that case literally starts at 0 for the
lexicographically first-sorted symbol in the symtypetab and counts those
symbols, so it corresponds to nothing useful).
This means that even though object files have a symtypetab (generated by
the compiler or by ld -r), the only way we can look up anything in it is
to iterate over all symbols in turn with ctf_symbol_next until we find
the one we want.
This is unhelpful and pointlessly inefficient.
So add a pair of functions to look up symbols by name in a dict and in a
whole archive: ctf_lookup_by_symbol_name and ctf_arc_lookup_symbol_name.
These are identical to the existing functions except that they take
symbol names rather than symbol numbers.
To avoid insane repetition, we do some refactoring in the process, so
that both ctf_lookup_by_symbol and ctf_arc_lookup_symbol turn into thin
wrappers around internal functions that do both lookup by symbol index
and lookup by name. This massively reduces code duplication because
even the existing lookup-by-index stuff wants to use a name sometimes
(when looking up in indexed sections), and the new lookup-by-name stuff
has to turn it into an index sometimes (when looking up in non-indexed
sections): doing it this way lets us share most of that.
The actual name->index lookup is done by ctf_lookup_symbol_idx. We do
not anticipate this lookup to be as heavily used as ld.so symbol lookup
by many orders of magnitude, so using the ELF symbol hashes would
probably take more time to read them than is saved by using the hashes,
and it adds a lot of complexity. Instead, do a linear search for the
symbol name, caching all the name -> index mappings as we go, so that
future searches are likely to hit in the cache. To avoid having to
repeat this search over and over in a CTF archive when
ctf_arc_lookup_symbol_name is used, have cached archive lookups (the
sort done by ctf_arc_lookup_symbol* and the ctf_archive_next iterator)
pick out the first dict they cache in a given archive and store it in a
new ctf_archive field, ctfi_crossdict_cache. This can be used to store
cross-dictionary cached state that depends on things like the ELF symbol
table rather than the contents of any one dict. ctf_lookup_symbol_idx
then caches its name->index mappings in the dictionary named in the
crossdict cache, if any, so that ctf_lookup_symbol_idx in other dicts
in the same archive benefit from the previous linear search, and the
symtab only needs to be scanned at most once.
(Note that if you call ctf_lookup_by_symbol_name in one specific dict,
and then follow it with a ctf_arc_lookup_symbol_name, the former will
not use the crossdict cache because it's only populated by the dict
opens in ctf_arc_lookup_symbol_name. This is harmless except for a small
one-off waste of memory and time: it's only a cache, after all. We can
fix this later by using the archive caching machinery more
aggressively.)
In ctf-archive, we do similar things, turning ctf_arc_lookup_symbol into
a wrapper around a new function that does both index -> ID and name ->
ID lookups across all dicts in an archive. We add a new
ctfi_symnamedicts cache that maps symbol names to the ctf_dict_t * that
it was found in (so that linear searches for symbols don't need to be
repeated): but we also *remove* a cache, the ctfi_syms cache that was
memoizing the actual ctf_id_t returned from every call to
ctf_arc_lookup_symbol. This is pointless: all it saves is one call to
ctf_lookup_by_symbol, and that's basically an array lookup and nothing
more so isn't worth caching. (Equally, given that symbol -> index
mappings are cached by ctf_lookup_by_symbol_name, those calls are nearly
free after the first call, so there's no point caching the ctf_id_t in
that case either.)
We fix up one test that was doing manual symbol lookup to use
ctf_arc_lookup_symbol instead, and enhance it to check that the caching
layer is not totally broken: we also add a new test to do lookups in a
.o file, and another to do lookups in an archive with conflicted types
and make sure that sort of multi-dict lookup is actually working.
include/ChangeLog
2021-02-17 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (ctf_arc_lookup_symbol_name): New.
(ctf_lookup_by_symbol_name): Likewise.
libctf/ChangeLog
2021-02-17 Nick Alcock <nick.alcock@oracle.com>
* ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
<ctf_symhash_latest>: Likewise.
(struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
<ctfi_symnamedicts>: New.
<ctfi_syms>: Remove.
(ctf_lookup_symbol_name): Remove.
* ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
parent properly. Make static.
(ctf_lookup_symbol_idx): New, linear search for the symbol name,
cached in the crossdict cache's ctf_symhash (if available), or
this dict's (otherwise).
(ctf_try_lookup_indexed): Allow the symname to be passed in.
(ctf_lookup_by_symbol): Turn into a wrapper around...
(ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
using ctf_lookup_symbol_idx in non-writable dicts. Special-case
name lookup in dynamic dicts without reported symbols, which have
no symtab or dynsymidx but where name lookup should still work.
(ctf_lookup_by_symbol_name): New, another wrapper.
* ctf-archive.c (enosym): Note that this is present in
ctfi_symnamedicts too.
(ctf_arc_close): Adjust for removal of ctfi_syms. Free the
ctfi_symnamedicts.
(ctf_arc_flush_caches): Likewise.
(ctf_dict_open_cached): Memoize the first cached dict in the
crossdict cache.
(ctf_arc_lookup_symbol): Turn into a wrapper around...
(ctf_arc_lookup_sym_or_name): ... this. No longer cache
ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
still cache the dicts those lookups succeed in). Add
lookup-by-name support, with dicts of successful lookups cached in
ctfi_symnamedicts. Refactor the caching code a bit.
(ctf_arc_lookup_symbol_name): New, another wrapper.
* ctf-open.c (ctf_dict_close): Free the ctf_symhash.
* libctf.ver (LIBCTF_1.2): New version. Add
ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
* testsuite/libctf-lookup/enum-symbol.c (main): Use
ctf_arc_lookup_symbol rather than looking up the name ourselves.
Fish it out repeatedly, to make sure that symbol caching isn't
broken.
(symidx_64): Remove.
(symidx_32): Remove.
* testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
in an unlinked object file (indexed symtypetab sections only).
* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
(try_maybe_reporting): Check symbol types via
ctf_lookup_by_symbol_name as well as ctf_symbol_next.
* testsuite/libctf-lookup/conflicting-type-syms.*: New test of
lookups in a multi-dict archive.
2021-02-17 23:21:12 +08:00
|
|
|
|
2021-02-17 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf-api.h (ctf_arc_lookup_symbol_name): New.
|
|
|
|
|
(ctf_lookup_by_symbol_name): Likewise.
|
|
|
|
|
|
2021-01-26 18:02:38 +08:00
|
|
|
|
2021-02-19 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
PR 27158
|
|
|
|
|
* opcode/riscv.h: Updated encoding macros.
|
|
|
|
|
|
2021-01-28 10:45:56 +08:00
|
|
|
|
2021-02-18 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
* opcode/riscv.h: Moved stuff and make the file tidy.
|
|
|
|
|
|
2021-02-15 21:20:00 +08:00
|
|
|
|
2021-02-15 Andreas Krebbel <krebbel@linux.ibm.com>
|
|
|
|
|
|
|
|
|
|
* opcode/s390.h (enum s390_opcode_cpu_val): Add
|
|
|
|
|
S390_OPCODE_ARCH14.
|
|
|
|
|
|
2021-01-16 14:00:45 +08:00
|
|
|
|
2021-02-08 Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
* opcode/tic54x.h (mmregs): Rename to ...
|
|
|
|
|
(tic54x_mmregs): ... this.
|
|
|
|
|
(regs): Rename to ...
|
|
|
|
|
(tic54x_regs): ... this.
|
|
|
|
|
(condition_codes): Rename to ...
|
|
|
|
|
(tic54x_condition_codes): ... this.
|
|
|
|
|
(cc2_codes): Rename to ...
|
|
|
|
|
(tic54x_cc2_codes): ... this.
|
|
|
|
|
(status_bits): Rename to ...
|
|
|
|
|
(tic54x_status_bits): ... this.
|
|
|
|
|
(cc3_codes): Rename to ...
|
|
|
|
|
(tic54x_cc3_codes): ... this.
|
|
|
|
|
(misc_symbols): Rename to ...
|
|
|
|
|
(tic54x_misc_symbols): ... this.
|
|
|
|
|
|
2021-02-05 11:12:59 +08:00
|
|
|
|
2021-02-05 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
PR 27348
|
|
|
|
|
* opcode/riscv.h: Remove obsolete OP_*CUSTOM_IMM.
|
|
|
|
|
|
2021-02-05 10:42:31 +08:00
|
|
|
|
2021-02-05 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
PR 27348
|
|
|
|
|
* opcode/riscv-opc.h: Remove obsolete Xcustom support.
|
|
|
|
|
|
2021-01-28 03:55:45 +08:00
|
|
|
|
2021-01-27 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf-api.h (ECTF_NONAME): New.
|
|
|
|
|
(ECTF_NERR): Adjust.
|
|
|
|
|
|
libctf, ld: fix symtypetab and var section population under ld -r
The variable section in a CTF dict is meant to contain the types of
variables that do not appear in the symbol table (mostly file-scope
static declarations). We implement this by having the compiler emit
all potential data symbols into both sections, then delete those
symbols from the variable section that correspond to data symbols the
linker has reported.
Unfortunately, the check for this in ctf_serialize is wrong: rather than
checking the set of linker-reported symbols, we check the set of names
in the data object symtypetab section: if the linker has reported no
symbols at all (usually if ld -r has been run, or if a non-linker
program that does not use symbol tables is calling ctf_link) this will
include every single symbol, emptying the variable section completely.
Worse, when ld -r is in use, we want to force writeout of every
symtypetab entry on the inputs, in an indexed section, whether or not
the linker has reported them, since this isn't a final link yet and the
symbol table is not finalized (and may grow more symbols than the linker
has yet reported). But the check for this is flawed too: we were
relying on ctf_link_shuffle_syms not having been called if no symbols
exist, but that function is *always* called by ld even when ld -r is in
use: ctf_link_add_linker_symbol is the one that's not called when there
are no symbols.
We clearly need to rethink this. Using the emptiness of the set of
reported symbols as a test for ld -r is just ugly: the linker already
knows if ld -r is underway and can just tell us. So add a new linker
flag CTF_LINK_NO_FILTER_REPORTED_SYMS that is set to stop the linker
filtering the symbols in the symtypetab sections using the set that the
linker has reported: use the presence or absence of this flag to
determine whether to emit unindexed symtabs: we only remove entries from
the variable section when filtering symbols, and we only remove them if
they are in the reported symbol set, fixing the case where no symbols
are reported by the linker at all.
(The negative sense of the new CTF_LINK flag is intentional: the common
case, both for ld and for simple tools that want to do a ctf_link with
no ELF symbol table in sight, is probably to filter out symbols that no
linker has reported: i.e., for the simple tools, all of them.)
There's another wrinkle, though. It is quite possible for a non-linker
to add symbols to a dict via ctf_add_*_sym and then write it out via the
ctf_write APIs: perhaps it's preparing a dict for a later linker
invocation. Right now this would not lead to anything terribly
meaningful happening: ctf_serialize just assumes it was called via
ctf_link if symbols are present. So add an (internal-to-libctf) flag
that indicates that a writeout is happening via ctf_link_write, and set
it there (propagating it to child dicts as needed). ctf_serialize can
then spot when it is not being called by a linker, and arrange to always
write out an indexed, sorted symtypetab for fastest possible future
symbol lookup by name in that case. (The writeouts done by ld -r are
unsorted, because the only thing likely to use those symtabs is the
linker, which doesn't benefit from symtypetab sorting.)
Tests added for all three linking cases (ld -r, ld -shared, ld), with a
bit of testsuite framework enhancement to stop it unconditionally
linking the CTF to be checked by the lookup program with -shared, so
tests can now examine CTF linked with -r or indeed with no flags at all,
though the output filename is still foo.so even in this case.
Another test added for the non-linker case that endeavours to determine
whether the symtypetab is sorted by examining the order of entries
returned from ctf_symbol_next: nobody outside libctf should rely on
this ordering, but this test is not outside libctf :)
include/ChangeLog
2021-01-26 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (CTF_LINK_NO_FILTER_REPORTED_SYMS): New.
ld/ChangeLog
2021-01-26 Nick Alcock <nick.alcock@oracle.com>
* ldlang.c (lang_merge_ctf): Set CTF_LINK_NO_FILTER_REPORTED_SYMS
when appropriate.
libctf/ChangeLog
2021-01-27 Nick Alcock <nick.alcock@oracle.com>
* ctf-impl.c (_libctf_nonnull_): Add parameters.
(LCTF_LINKING): New flag.
(ctf_dict_t) <ctf_link_flags>: Mention it.
* ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
(ctf_write): Likewise, including in child dictionaries.
(ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
are no reported symbols.
* ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
the variable has been reported as a symbol by the linker.
(symtypetab_skippable): Mention relationship between SYMFP and the
flags.
(symtypetab_density): Adjust nonnullity. Exit early if no symbols
were reported and force-indexing is off (i.e., we are doing a
final link).
(ctf_serialize): Handle the !LCTF_LINKING case by writing out an
indexed, sorted symtypetab (and allow SYMFP to be NULL in this
case). Turn sorting off if this is a non-final link. Only delete
nonstatic vars if we are filtering symbols and the linker has
reported some.
* testsuite/libctf-regression/nonstatic-var-section-ld-r*:
New test of variable and symtypetab section population when
ld -r is used.
* testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
Likewise, when ld of an executable is used.
* testsuite/libctf-regression/nonstatic-var-section-ld.lk:
Likewise, when ld -shared alone is used.
* testsuite/libctf-regression/nonstatic-var-section-ld*.c:
Lookup programs for the above.
* testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
test, testing survival of symbols across ctf_write paths.
* testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
nonshared, suppressing linking of the SOURCE with -shared.
2021-01-17 00:49:29 +08:00
|
|
|
|
2021-01-26 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf-api.h (CTF_LINK_NO_FILTER_REPORTED_SYMS): New.
|
|
|
|
|
|
2021-02-04 16:15:03 +08:00
|
|
|
|
2021-02-04 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
* opcode/riscv-opc.h: Removed macros for zb* extensions.
|
|
|
|
|
* opcode/riscv.h (riscv_insn_class): Removed INSN_CLASS_ZB*.
|
|
|
|
|
|
2021-01-15 09:36:51 +08:00
|
|
|
|
2021-01-15 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
* opcode/riscv.h: Indent and GNU coding standards tidy,
|
|
|
|
|
also aligned the code.
|
|
|
|
|
|
2021-01-13 10:05:48 +08:00
|
|
|
|
2021-01-15 Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
* elf/riscv.h: Comments tidy and improvement.
|
|
|
|
|
* opcode/riscv-opc.h: Likewise.
|
|
|
|
|
* opcode/riscv.h: Likewise.
|
|
|
|
|
|
2021-01-06 01:39:04 +08:00
|
|
|
|
2021-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
|
|
|
|
|
|
|
|
|
* opcode/aarch64.h (AARCH64_FEATURE_CSRE): Delete.
|
|
|
|
|
(aarch64_opnd): Delete AARCH64_OPND_CSRE_CSR.
|
|
|
|
|
|
2021-01-09 18:40:28 +08:00
|
|
|
|
2021-01-09 Nick Clifton <nickc@redhat.com>
|
|
|
|
|
|
|
|
|
|
* 2.36 release branch crated.
|
|
|
|
|
|
2021-01-07 15:53:25 +08:00
|
|
|
|
2021-01-07 Philipp Tomsich <prt@gnu.org>
|
|
|
|
|
|
|
|
|
|
* opcode/riscv-opc.h: Added MATCH_PAUSE, MASK_PAUSE and DECLARE_INSN
|
|
|
|
|
for pause hint instruction.
|
|
|
|
|
* opcode/riscv.h (enum riscv_insn_class): Added INSN_CLASS_ZIHINTPAUSE.
|
|
|
|
|
|
2020-12-15 23:11:03 +08:00
|
|
|
|
2021-01-07 Claire Xenia Wolf <claire@symbioticeda.com>
|
|
|
|
|
Jim Wilson <jimw@sifive.com>
|
|
|
|
|
Andrew Waterman <andrew@sifive.com>
|
|
|
|
|
Maxim Blinov <maxim.blinov@embecosm.com>
|
|
|
|
|
Kito Cheng <kito.cheng@sifive.com>
|
|
|
|
|
Nelson Chu <nelson.chu@sifive.com>
|
|
|
|
|
|
|
|
|
|
* opcode/riscv-opc.h: Added MASK/MATCH/DECLARE_INSN for ZBA/ZBB/ZBC.
|
|
|
|
|
* opcode/riscv.h (riscv_insn_class): Added INSN_CLASS_ZB*.
|
|
|
|
|
(enum riscv_isa_spec_class): Added ISA_SPEC_CLASS_DRAFT for the
|
|
|
|
|
frozen extensions.
|
|
|
|
|
|
libctf, include: support unnamed structure members better
libctf has no intrinsic support for the GCC unnamed structure member
extension. This principally means that you can't look up named members
inside unnamed struct or union members via ctf_member_info: you have to
tiresomely find out the type ID of the unnamed members via iteration,
then look in each of these.
This is ridiculous. Fix it by extending ctf_member_info so that it
recurses into unnamed members for you: this is still unambiguous because
GCC won't let you create ambiguously-named members even in the presence
of this extension.
For consistency, and because the release hasn't happened and we can
still do this, break the ctf_member_next API and add flags: we specify
one flag, CTF_MN_RECURSE, which if set causes ctf_member_next to
automatically recurse into unnamed members for you, returning not only
the members themselves but all their contained members, so that you can
use ctf_member_next to identify every member that it would be valid to
call ctf_member_info with.
New lookup tests are added for all of this.
include/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (CTF_MN_RECURSE): New.
(ctf_member_next): Add flags argument.
libctf/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
<ctn_next>: ... here.
* ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
* ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
* ctf-types.c (ctf_member_iter): Reimplement in terms of...
(ctf_member_next): ... this. Support recursive unnamed member
iteration (off by default).
(ctf_member_info): Look up members in unnamed sub-structs.
* ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
(ctf_dedup_emit_struct_members): Likewise.
* testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
members, and a normal member after the end.
* testsuite/libctf-lookup/struct-iteration.c: Verify that
ctf_member_count is consistent with the number of successful returns
from a non-recursive ctf_member_next.
* testsuite/libctf-lookup/struct-iteration-*: New, test iteration
over struct members.
* testsuite/libctf-lookup/struct-lookup.c: New test.
* testsuite/libctf-lookup/struct-lookup.lk: New test.
2021-01-05 21:25:56 +08:00
|
|
|
|
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf-api.h (CTF_MN_RECURSE): New.
|
|
|
|
|
(ctf_member_next): Add flags argument.
|
|
|
|
|
|
libctf, ld: prohibit getting the size or alignment of forwards
C allows you to do only a very few things with entities of incomplete
type (as opposed to pointers to them): make pointers to them and give
them cv-quals, roughly. In particular you can't sizeof them and you
can't get their alignment.
We cannot impose all the requirements the standard imposes on CTF users,
because the deduplicator can transform any structure type into a forward
for the purposes of breaking cycles: so CTF type graphs can easily
contain things like arrays of forward type (if you want to figure out
their size or alignment, you need to chase down the types this forward
might be a forward to in child TU dicts: we will soon add API functions
to make doing this much easier).
Nonetheless, it is still meaningless to ask for the size or alignment of
forwards: but libctf didn't prohibit this and returned nonsense from
internal implementation details when you asked (it returned the kind of
the pointed-to type as both the size and alignment, because forwards
reuse ctt_type as a type kind, and ctt_type and ctt_size overlap). So
introduce a new error, ECTF_INCOMPLETE, which is returned when you try
to get the size or alignment of forwards: we also return it when you try
to do things that require libctf itself to get the size or alignment of
a forward, notably using a forward as an array index type (which C
should never do in any case) or adding forwards to structures without
specifying their offset explicitly.
The dumper will not emit size or alignment info for forwards any more.
(This should not be an API break since ctf_type_size and ctf_type_align
could both return errors before now: any code that isn't expecting error
returns is already potentially broken.)
include/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* ctf-api.h (ECTF_INCOMPLETE): New.
(ECTF_NERR): Adjust.
ld/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Adjust for dumper
changes.
* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise.
* testsuite/ld-ctf/forward.c: New test...
* testsuite/ld-ctf/forward.d: ... and results.
libctf/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* ctf-types.c (ctf_type_resolve): Improve comment.
(ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
Emit errors into the right dict.
(ctf_type_align): Likewise.
* ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
when adding a member without explicit offset when this member, or
the previous member, is incomplete.
* ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
forwards.
(ctf_dump_member): Do not try to print their alignment.
2021-01-05 21:25:56 +08:00
|
|
|
|
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* ctf-api.h (ECTF_INCOMPLETE): New.
|
|
|
|
|
(ECTF_NERR): Adjust.
|
|
|
|
|
|
2021-01-01 11:51:52 +08:00
|
|
|
|
2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
|
|
|
|
|
|
|
|
|
|
* coff/internal.h: Correct comment spelling.
|
|
|
|
|
* coff/sym.h: Likewise.
|
|
|
|
|
* opcode/aarch64.h: Likewise.
|
|
|
|
|
|
2021-01-01 06:58:58 +08:00
|
|
|
|
2021-01-01 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
Update year range in copyright notice of all files.
|
|
|
|
|
|
2021-01-01 06:47:13 +08:00
|
|
|
|
For older changes see ChangeLog-2020
|
2016-01-01 18:44:31 +08:00
|
|
|
|
|
2021-01-01 06:47:13 +08:00
|
|
|
|
Copyright (C) 2021 Free Software Foundation, Inc.
|
2016-01-01 18:44:31 +08:00
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: change-log
|
|
|
|
|
left-margin: 8
|
|
|
|
|
fill-column: 74
|
|
|
|
|
version-control: never
|
|
|
|
|
End:
|