2021-01-07 06:22:47 +08:00
|
|
|
|
2021-01-07 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* po/BLD-POTFILES.in: Regenerate.
|
|
|
|
|
|
2021-01-07 06:07:38 +08:00
|
|
|
|
2021-01-07 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-elf/shared.exp: xfail pr22471 for targets that
|
|
|
|
|
complain about relocs in read-only sections. Tidy ASFLAGS append.
|
|
|
|
|
|
2021-01-06 09:31:10 +08:00
|
|
|
|
2021-01-06 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-sparc/sparc.exp (sparc64tests): Set text-segment
|
|
|
|
|
base for some tests.
|
|
|
|
|
* testsuite/ld-sparc/gotop32.dd: Match solaris output.
|
|
|
|
|
* testsuite/ld-sparc/gotop32.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/gotop32.td: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/gotop64.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/gotop64.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/gotop64.td: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlsg32.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlsg64.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlspie32.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlspie64.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunbin32.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunbin32.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunbin32.td: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunbin64.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunbin64.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunbin64.td: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunnopic32.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunnopic32.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunnopic64.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunnopic64.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunpic32.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunpic32.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunpic32.td: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunpic64.dd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunpic64.sd: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/tlssunpic64.td: Likewise.
|
|
|
|
|
* testsuite/ld-sparc/wdispcall.dd: Likewise.
|
|
|
|
|
|
2021-01-06 09:26:14 +08:00
|
|
|
|
2021-01-06 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-scripts/rgn-at10.d: xfail v850.
|
|
|
|
|
* testsuite/ld-scripts/rgn-at11.d: Likewise.
|
|
|
|
|
|
2021-01-06 05:50:39 +08:00
|
|
|
|
2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Added
|
|
|
|
|
riscv_choose_[ilp32|lp64]_emul to choose the correct linker script.
|
|
|
|
|
* testsuite/ld-riscv-elf/attr-merge-arch-01.d: Call
|
|
|
|
|
riscv_choose_[ilp32|lp64]_emul instead of hardcoding elf[32|64]lriscv.
|
|
|
|
|
* testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/c-lui-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/c-lui.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/call-relax.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/pcrel-lo-addend-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/pcrel-lo-addend.d: Likewise.
|
|
|
|
|
* testsuite/ld-riscv-elf/weakref32.d: Accept bigriscv in addition
|
|
|
|
|
to littleriscv.
|
|
|
|
|
* testsuite/ld-riscv-elf/weakref64.d: Likewise.
|
|
|
|
|
|
RISC-V: Implement support for big endian targets.
RISC-V instruction/code is always little endian, but data might be
big-endian. Therefore, we can not use the original bfd_get/bfd_put
to get/put the code for big endian targets. Add new riscv_get_insn
and riscv_put_insn to always get/put code as little endian can resolve
the problem. Just remember to update them once we have supported
the 48-bit/128-bit instructions in the future patches.
bfd/
* config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and
riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec.
* configure.ac: Handle riscv_elf[32|64]_be_vec.
* configure: Regenerate.
* elfnn-riscv.c: Include <limits.h> and define CHAR_BIT for
riscv_is_insn_reloc.
(riscv_get_insn): RISC-V instructions are always little endian, but
bfd_get may be used for big-endian, so add new riscv_get_insn to handle
the insturctions.
(riscv_put_insn): Likewsie.
(riscv_is_insn_reloc): Check if we are relocaing an instruction.
(perform_relocation): Call riscv_is_insn_reloc to decide if we should
use riscv_[get|put]_insn or bfd_[get|put].
(riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32
or bfd_[get|put]l16 for code.
(riscv_elf_relocate_section): Likewise.
(riscv_elf_finish_dynamic_symbol): Likewise.
(riscv_elf_finish_dynamic_sections): Likewise.
(_bfd_riscv_relax_call): Likewise.
(_bfd_riscv_relax_lui): Likewise.
(_bfd_riscv_relax_align): Likewise.
(_bfd_riscv_relax_pc): Likewise.
(riscv_elf_object_p): Handled for big endian.
(TARGET_BIG_SYM, TARGET_BIG_NAME): Defined.
* targets.c: Add riscv_elf[32|64]_be_vec.
(_bfd_target_vector): Likewise.
gas/
* config/tc-riscv.c (riscv_target_format): Add elf64-bigriscv and
elf32-bigriscv.
(install_insn): Always write instructions as little endian.
(riscv_make_nops): Likewise.
(md_convert_frag_branch): Likewise.
(md_number_to_chars): Write data in target endianness.
(options, md_longopts): Add -mbig-endian and -mlittle-endian options.
(md_parse_option): Handle the endian options.
* config/tc-riscv.h: Only define TARGET_BYTES_BIG_ENDIAN if not
already defined.
* configure.tgt: Added riscv64be*, riscv32be*, riscvbe*.
ld/
* configure.tgt: Added riscvbe-*-*, riscv32be*-*-*, riscv64be*-*-*,
riscv32be*-*-linux*, and riscv64be*-*-linux*.
* Makefile.am: Added eelf32briscv.c, eelf32briscv_ilp32f.c and
eelf32briscv_ilp32.c.
* Makefile.in: Regenerate.
* emulparams/elf32briscv.sh: Added.
* emulparams/elf32briscv_ilp32.sh: Likewise.
* emulparams/elf32briscv_ilp32f.sh: Likewise.
* emulparams/elf64briscv.sh: Likewise.
* emulparams/elf64briscv_lp64.sh: Likewise.
* emulparams/elf64briscv_lp64f.sh: Likewise.
2021-01-06 05:50:32 +08:00
|
|
|
|
2021-01-06 Marcus Comstedt <marcus@mc.pp.se>
|
|
|
|
|
|
|
|
|
|
* configure.tgt: Added riscvbe-*-*, riscv32be*-*-*, riscv64be*-*-*,
|
|
|
|
|
riscv32be*-*-linux*, and riscv64be*-*-linux*.
|
|
|
|
|
* Makefile.am: Added eelf32briscv.c, eelf32briscv_ilp32f.c and
|
|
|
|
|
eelf32briscv_ilp32.c.
|
|
|
|
|
* Makefile.in: Regenerate.
|
|
|
|
|
* emulparams/elf32briscv.sh: Added.
|
|
|
|
|
* emulparams/elf32briscv_ilp32.sh: Likewise.
|
|
|
|
|
* emulparams/elf32briscv_ilp32f.sh: Likewise.
|
|
|
|
|
* emulparams/elf64briscv.sh: Likewise.
|
|
|
|
|
* emulparams/elf64briscv_lp64.sh: Likewise.
|
|
|
|
|
* emulparams/elf64briscv_lp64f.sh: Likewise.
|
|
|
|
|
|
2021-01-05 21:25:56 +08:00
|
|
|
|
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-ctf/enum-forward.c: New test.
|
|
|
|
|
* testsuite/ld-ctf/enum-forward.c: New results.
|
|
|
|
|
|
libctf, ld: dump enums: generally improve dump formatting
This commit adds dumping of enumerands in this general form:
0x3: (kind 8) enum eleven_els (size 0x4) (aligned at 0x4)
ELEVEN_ONE: 10
ELEVEN_TWO: 11
ELEVEN_THREE: -256
ELEVEN_FOUR: -255
ELEVEN_FIVE: -254
...
ELEVEN_SEVEN: -252
ELEVEN_EIGHT: -251
ELEVEN_NINE: -250
ELEVEN_TEN: -249
ELEVEN_ELEVEN: -248
The first and last enumerands in the enumerated type are printed so that
you can tell if they've been cut off at one end or the other. (For now,
there is no way to control how many enumerands are printed.)
The dump output in general is improved, from this sort of thing a few
days ago:
4c: char [0x0:0x8] (size 0x1)
[0x0] (ID 0x4c) (kind 1) char:8 (aligned at 0x1, format 0x3, offset:bits 0x0:0x8)
4d: char * (size 0x8) -> 4c: char [0x0:0x8] (size 0x1)
[0x0] (ID 0x4d) (kind 3) char * (aligned at 0x8)
[...]
5a: struct _IO_FILE (size 0xd8)
[0x0] (ID 0x5a) (kind 6) struct _IO_FILE (aligned at 0x4)
[0x0] (ID 0x3) (kind 1) int _flags:32 (aligned at 0x4, format 0x1, offset:bits 0x0:0x20)
[0x40] (ID 0x4d) (kind 3) char * _IO_read_ptr (aligned at 0x8)
[0x80] (ID 0x4d) (kind 3) char * _IO_read_end (aligned at 0x8)
[0xc0] (ID 0x4d) (kind 3) char * _IO_read_base (aligned at 0x8)
5b: __FILE (size 0xd8) -> 5a: struct _IO_FILE (size 0xd8)
[0x0] (ID 0x5b) (kind 10) __FILE (aligned at 0x4)
[0x0] (ID 0x3) (kind 1) int _flags:32 (aligned at 0x4, format 0x1, offset:bits 0x0:0x20)
[0x40] (ID 0x4d) (kind 3) char * _IO_read_ptr (aligned at 0x8)
[0x80] (ID 0x4d) (kind 3) char * _IO_read_end (aligned at 0x8)
[0xc0] (ID 0x4d) (kind 3) char * _IO_read_base (aligned at 0x8)
[...]
406: struct coff_link_hash_entry (size 0x60)
[0x0] (ID 0x406) (kind 6) struct coff_link_hash_entry (aligned at 0x8)
[0x0] (ID 0x2b3) (kind 6) struct bfd_link_hash_entry root (aligned at 0x8)
[0x0] (ID 0x1d6) (kind 6) struct bfd_hash_entry root (aligned at 0x8)
[0x0] (ID 0x1d7) (kind 3) struct bfd_hash_entry * next (aligned at 0x8)
[0x40] (ID 0x61) (kind 3) const char * string (aligned at 0x8)
[0x80] (ID 0x1) (kind 1) long unsigned int hash:64 (aligned at 0x8, format 0x0, offset:bits 0x0:0x40)
[0xc0] (ID 0x397) (kind 8) enum bfd_link_hash_type type:8 (aligned at 0x1, format 0x0, offset:bits 0x0:0x8)
[0xc8] (ID 0x1c7) (kind 1) unsigned int non_ir_ref_regular:1 (aligned at 0x1, format 0x0, offset:bits 0x8:0x1)
[0xc9] (ID 0x1c8) (kind 1) unsigned int non_ir_ref_dynamic:1 (aligned at 0x1, format 0x0, offset:bits 0x9:0x1)
[0xca] (ID 0x1c9) (kind 1) unsigned int linker_def:1 (aligned at 0x1, format 0x0, offset:bits 0xa:0x1)
[0xcb] (ID 0x1ca) (kind 1) unsigned int ldscript_def:1 (aligned at 0x1, format 0x0, offset:bits 0xb:0x1)
[0xcc] (ID 0x1cb) (kind 1) unsigned int rel_from_abs:1 (aligned at 0x1, format 0x0, offset:bits 0xc:0x1)
... to this:
0x4c: (kind 1) char (format 0x3) (size 0x1) (aligned at 0x1)
0x4d: (kind 3) char * (size 0x8) (aligned at 0x8) -> 0x4c: (kind 1) char (format 0x3) (size 0x1) (aligned at 0x1)
0x5a: (kind 6) struct _IO_FILE (size 0xd8) (aligned at 0x4)
[0x0] _flags: ID 0x3: (kind 1) int (format 0x1) (size 0x4) (aligned at 0x4)
[0x40] _IO_read_ptr: ID 0x4d: (kind 3) char * (size 0x8) (aligned at 0x8)
[0x80] _IO_read_end: ID 0x4d: (kind 3) char * (size 0x8) (aligned at 0x8)
[0xc0] _IO_read_base: ID 0x4d: (kind 3) char * (size 0x8) (aligned at 0x8)
[0x100] _IO_write_base: ID 0x4d: (kind 3) char * (size 0x8) (aligned at 0x8)
0x5b: (kind 10) __FILE (size 0xd8) (aligned at 0x4) -> 0x5a: (kind 6) struct _IO_FILE (size 0xd8) (aligned at 0x4)
[...]
0x406: (kind 6) struct coff_link_hash_entry (size 0x60) (aligned at 0x8)
[0x0] root: ID 0x2b3: (kind 6) struct bfd_link_hash_entry (size 0x38) (aligned at 0x8)
[0x0] root: ID 0x1d6: (kind 6) struct bfd_hash_entry (size 0x18) (aligned at 0x8)
[0x0] next: ID 0x1d7: (kind 3) struct bfd_hash_entry * (size 0x8) (aligned at 0x8)
[0x40] string: ID 0x61: (kind 3) const char * (size 0x8) (aligned at 0x8)
[0x80] hash: ID 0x1: (kind 1) long unsigned int (format 0x0) (size 0x8) (aligned at 0x8)
[0xc0] type: ID 0x397: (kind 8) enum bfd_link_hash_type (format 0x7f2e) (size 0x1) (aligned at 0x1)
[0xc8] non_ir_ref_regular: ID 0x1c7: (kind 1) unsigned int:1 [slice 0x8:0x1] (format 0x0) (size 0x1) (aligned at 0x1)
[0xc9] non_ir_ref_dynamic: ID 0x1c8: (kind 1) unsigned int:1 [slice 0x9:0x1] (format 0x0) (size 0x1) (aligned at 0x1)
[0xca] linker_def: ID 0x1c9: (kind 1) unsigned int:1 [slice 0xa:0x1] (format 0x0) (size 0x1) (aligned at 0x1)
[0xcb] ldscript_def: ID 0x1ca: (kind 1) unsigned int:1 [slice 0xb:0x1] (format 0x0) (size 0x1) (aligned at 0x1)
[0xcc] rel_from_abs: ID 0x1cb: (kind 1) unsigned int:1 [slice 0xc:0x1] (format 0x0) (size 0x1) (aligned at 0x1)
[...]
In particular, indented subsections are only present for actual structs
and unions, not forwards to them, and the structure itself doesn't add a
spurious level of indentation; structure field names are easier to spot
(at the cost of not making them look so much like C field declarations
any more, but they weren't always shown in valid decl syntax even before
this change) the size, type kind, and alignment are shown for all types
for which they are meaningful; bitfield info is only shown for actual
bitfields within structures and not ordinary integral fields; and type
IDs are never omitted. Type printing is in general much more consistent
and there is much less duplicated code in the type dumper.
There is one user-visible effect outside the dumper: ctf_type_(a)name
was erroneously emitting a trailing space on the name of slice types,
even though a slice of an int and an int with the corresponding encoding
represent the same type and should have the same print form. This
trailing space is now gone.
ld/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* testsuite/ld-ctf/array.d: Adjust for dumper changes.
* testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise.
* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise.
* testsuite/ld-ctf/conflicting-enums.d: Likewise.
* testsuite/ld-ctf/conflicting-typedefs.d: Likewise.
* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise.
* testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Likewise.
* testsuite/ld-ctf/cross-tu-into-cycle.d: Likewise.
* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
* testsuite/ld-ctf/cycle-1.d: Likewise.
* testsuite/ld-ctf/cycle-2.A.d: Likewise.
* testsuite/ld-ctf/cycle-2.B.d: Likewise.
* testsuite/ld-ctf/cycle-2.C.d: Likewise.
* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
* testsuite/ld-ctf/diag-cuname.d: Likewise.
* testsuite/ld-ctf/diag-parlabel.d: Likewise.
* testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Likewise.
* testsuite/ld-ctf/forward.d: Likewise.
* testsuite/ld-ctf/function.d: Likewise.
* testsuite/ld-ctf/slice.d: Likewise.
* testsuite/ld-ctf/super-sub-cycles.d: Likewise.
* testsuite/ld-ctf/enums.c: New test.
* testsuite/ld-ctf/enums.d: New test.
libctf/ChangeLog
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
* ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
* ctf-types.c (ctf_type_aname): No longer deal with slices here.
* ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
(CTF_FT_REFS): New.
(CTF_FT_BITFIELD): Likewise.
(CTF_FT_ID): Likewise.
(ctf_dump_member): Do not do indentation here. Migrate the
type-printing parts of this into...
(ctf_dump_format_type): ... here, to be shared by all type printers.
Get the errno value for non-representable types right. Do not print
bitfield info for non-bitfields. Improve the format and indentation
of other type output. Shuffle spacing around to make all indentation
either 'width of column' or 4 chars.
(ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
(ctf_dump_objts): Likewise. Spacing shuffle.
(ctf_dump_var): Likewise.
(type_hex_digits): Migrate down in the file, to above its new user.
(ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
ctf_dump_format_type. Don't trim off excess linefeeds now we no
longer generate them. Dump enumerated types.
2021-01-05 21:25:56 +08:00
|
|
|
|
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-ctf/array.d: Adjust for dumper changes.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-enums.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-typedefs.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-into-cycle.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-2.A.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-2.B.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-2.C.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-cuname.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-parlabel.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/forward.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/function.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/slice.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/super-sub-cycles.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/enums.c: New test.
|
|
|
|
|
* testsuite/ld-ctf/enums.d: New test.
|
|
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
|
2021-01-05 21:25:56 +08:00
|
|
|
|
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-ctf/array.d: Adjust for dumper changes.
|
|
|
|
|
* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-cuname.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-parlabel.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/function.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/slice.d: Likewise.
|
|
|
|
|
|
2021-01-05 21:25:56 +08:00
|
|
|
|
2021-01-05 Nick Alcock <nick.alcock@oracle.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-ctf/array.d: Adjust for dumper changes.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-1.B-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-1.B-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-1.parent.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-2.A-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-2.A-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-2.parent.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-3.C-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-3.C-2.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-cycle-3.parent.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-enums.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/conflicting-typedefs.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-cyclic-nonconflicting.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-into-cycle.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-1.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-2.A.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-2.B.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/cycle-2.C.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-cttname-null.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-cuname.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-parlabel.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/diag-wrong-magic-number-mixed.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/function.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/slice.d: Likewise.
|
|
|
|
|
* testsuite/ld-ctf/super-sub-cycles.d: Likewise.
|
|
|
|
|
|
2021-01-05 20:24:25 +08:00
|
|
|
|
2021-01-05 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
* testsuite/ld-scripts/sysroot-prefix.exp: Exclude some targets.
|
|
|
|
|
|
2021-01-05 13:13:37 +08:00
|
|
|
|
2021-01-05 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
PR ld/26256
|
|
|
|
|
* testsuite/ld-elf/pr26256-1b.d: xfail s12z.
|
|
|
|
|
* testsuite/ld-scripts/crossref.exp (cross1): Don't xfail ia64.
|
|
|
|
|
|
2021-01-05 04:37:49 +08:00
|
|
|
|
2021-01-04 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
|
|
|
|
|
|
|
PR ld/26256
|
|
|
|
|
* ldlang.c (gc_section_callback): Set pattern.
|
|
|
|
|
* testsuite/ld-elf/pr26256-1.s: New file.
|
|
|
|
|
* testsuite/ld-elf/pr26256-1.t: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-1a.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-1b.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-2.s: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-2.t: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-2a.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-2b-alt.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-2b.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-3.s: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-3a.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-3a.t: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-3b.d: Likewise.
|
|
|
|
|
* testsuite/ld-elf/pr26256-3b.t: Likewise.
|
|
|
|
|
|
2021-01-04 14:43:51 +08:00
|
|
|
|
2021-01-04 Alan Modra <amodra@gmail.com>
|
|
|
|
|
|
|
|
|
|
PR 26822
|
|
|
|
|
* testsuite/ld-arm/non-contiguous-arm2.d: Adjust STT_FILE symbol match.
|
|
|
|
|
* testsuite/ld-arm/non-contiguous-arm3.d: Likewise.
|
|
|
|
|
* testsuite/ld-arm/non-contiguous-arm5.d: Likewise.
|
|
|
|
|
* testsuite/ld-arm/non-contiguous-arm6.d: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlsbin.rd: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlsbin2.rd: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlsbindesc.rd: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlsdesc.rd: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlsnopic.rd: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlspic.rd: Likewise.
|
|
|
|
|
* testsuite/ld-i386/tlspic2.rd: Likewise.
|
|
|
|
|
* testsuite/ld-mips-elf/global-local-symtab-sort-n64.d: Likewise.
|
|
|
|
|
* testsuite/ld-mips-elf/global-local-symtab-sort-n64t.d: Likewise.
|
|
|
|
|
* testsuite/ld-mips-elf/global-local-symtab-sort-o32.d: Likewise.
|
|
|
|
|
* testsuite/ld-mips-elf/global-local-symtab-sort-o32t.d: Likewise.
|
|
|
|
|
* testsuite/ld-plugin/pr17973.d: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-1.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-1b.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-1r.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-1rb.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-app-1.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-app-1b.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-app-1r.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/shlib-noindex.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/static-app-1.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/static-app-1b.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/static-app-1r.rd: Likewise.
|
|
|
|
|
* testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
|
|
|
|
|
* testsuite/ld-x86-64/tlsbin.rd: Likewise.
|
|
|
|
|
* testsuite/ld-x86-64/tlsbin2.rd: Likewise.
|
|
|
|
|
* testsuite/ld-x86-64/tlsbindesc.rd: Likewise.
|
|
|
|
|
* testsuite/ld-x86-64/tlsdesc.rd: Likewise.
|
|
|
|
|
* testsuite/ld-x86-64/tlspic.rd: Likewise.
|
|
|
|
|
* testsuite/ld-x86-64/tlspic2.rd: Likewise.
|
|
|
|
|
* testsuite/ld-xtensa/tlsbin.rd: Likewise.
|
|
|
|
|
* testsuite/ld-xtensa/tlspic.rd: Likewise.
|
|
|
|
|
|
2021-01-01 11:51:52 +08:00
|
|
|
|
2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
|
|
|
|
|
|
|
|
|
|
* configure.tgt: Correct comment grammar.
|
|
|
|
|
* emultempl/m68hc1xelf.em: Likewise.
|
|
|
|
|
* ld.texi: Correct grammar.
|
|
|
|
|
|
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:
|