~ubuntu-support-team/binutils/+git/binutils-gdb:users/helflym/try-aarch64nto

Last commit made on 2023-02-28
Get this branch:
git clone -b users/helflym/try-aarch64nto https://git.launchpad.net/~ubuntu-support-team/binutils/+git/binutils-gdb

Branch merges

Branch information

Name:
users/helflym/try-aarch64nto
Repository:
lp:~ubuntu-support-team/binutils/+git/binutils-gdb

Recent commits

4bb646c... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

ld/testsuite: adjust ld-aarch64 tests for aarch64nto address

Some tests are refering to the address of their symbols. These are
dependent of the emulation and must be adjusted when enabling them for a
new one.

ld/ChangeLog:

        * testsuite/ld-aarch64/ifunc-1-local.d: Adjust for aarch64nto
        addresses.
        * testsuite/ld-aarch64/ifunc-1.d: Likewise.
        * testsuite/ld-aarch64/ifunc-2-local.d: Likewise.
        * testsuite/ld-aarch64/ifunc-2.d: Likewise.
        * testsuite/ld-aarch64/ifunc-21.d: Likewise.
        * testsuite/ld-aarch64/ifunc-3a.d: Likewise.

06bc164... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

ld/testsuite: adjust tests dump to handle _btext on aarch64-qnx

_btext symbol is a custom symbol made by the aarch64-qnx linker script to
mark the beginning of the .text section.
However, this symbol might replace the first symbol of .text that should
be printed by objdump. This is due to the fact that objdump is
internally ordering symbols lexically if it cannot order them by another
way.

ld/ChangeLog:

        * testsuite/ld-aarch64/emit-relocs-309-low.d: Allow _btext as
        first symbol.
        * testsuite/ld-aarch64/emit-relocs-309-up.d: Likewise.
        * testsuite/ld-aarch64/erratum843419-adr.d: Likewise.
        * testsuite/ld-aarch64/erratum843419-adrp.d: Likewise.
        * testsuite/ld-aarch64/erratum843419-far-full.d: Likewise.
        * testsuite/ld-aarch64/erratum843419-full.d: Likewise.
        * testsuite/ld-aarch64/erratum843419-no-args.d: Likewise.
        * testsuite/ld-aarch64/farcall-b-defsym.d: Likewise.
        * testsuite/ld-aarch64/farcall-b-none-function.d: Likewise.
        * testsuite/ld-aarch64/farcall-b-plt.d: Likewise.
        * testsuite/ld-aarch64/farcall-b-section.d: Likewise.
        * testsuite/ld-aarch64/farcall-b.d: Likewise.
        * testsuite/ld-aarch64/farcall-bl-defsym.d: Likewise.
        * testsuite/ld-aarch64/farcall-bl-none-function.d: Likewise.
        * testsuite/ld-aarch64/farcall-bl-plt.d: Likewise.
        * testsuite/ld-aarch64/farcall-bl-section.d: Likewise.
        * testsuite/ld-aarch64/farcall-bl.d: Likewise.
        * testsuite/ld-aarch64/farcall-group.d: Likewise.
        * testsuite/ld-aarch64/ifunc-1-local.d: Likewise.
        * testsuite/ld-aarch64/ifunc-2-local.d: Likewise.
        * testsuite/ld-aarch64/ifunc-21.d: Likewise.
        * testsuite/ld-aarch64/ifunc-3a.d: Likewise.
        * testsuite/ld-aarch64/ifunc-7c.d: Likewise.
        * testsuite/ld-aarch64/limit-b.d: Likewise.
        * testsuite/ld-aarch64/tls-gd-symbolic: Likewise.

6d9fb23... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

ld/testsuite: disable ilp32 tests for aarch64-qnx

aarch64nto32 emulation isn't supported. The tests will then fall back
on aarch64elf32. It does work but some extra warnings are being
generated because the "-z relro" being added aarch64nto but ignored by
aarch64elf32 emulation.
Skip the tests to avoid any problems.

ld/ChangeLog:

        * testsuite/ld-aarch64/emit-relocs-112-overflow.d: Skip for
        aarch64nto.
        * testsuite/ld-aarch64/emit-relocs-112.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-113.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-114-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-114.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-115.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-116-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-116.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-117.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-118-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-118.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-119.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-22.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-23.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-28.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-86-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-86.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-87.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-88-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-88.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-89.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-90-overflow.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-90.d: Likewise.
        * testsuite/ld-aarch64/emit-relocs-92.d: Likewise.
        * testsuite/ld-aarch64/tls-desc-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-all-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gd-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gdesc-le-2-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-gdesc-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ie-le-2-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ie-le-3-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ie-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ld-le-small-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-relax-ld-le-tiny-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-desc-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-desc-le-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-gd-ie-ilp32.d: Likewise.
        * testsuite/ld-aarch64/tls-tiny-gd-le-ilp32.d: Likewise.

50830a3... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

ld/testsuite: add aarch64nto to ld-aarch64

ld/ChangeLog:

        * testsuite/ld-aarch64/aarch64-elf.exp: Add support for
        aarch64nto.

a6c4606... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

ld: add support of QNX stack arguments for aarch64nto

QNX is handling the stack argument using a .note section. Generate it
according to ELF argument -zexecstack, -zstack-size and a new NTO
argument --lazy-stack. Another NTO argument --stack mimicking
-zstack-size is added in order to ensure compatibility with previously
made NTO linkers.
This requires a new emultempl nto.em which is applied above the default
${ARCH}elf.em.

ld/ChangeLog:

 * emulparams/aarch64nto.sh: Move to nto.em.
 * emultempl/nto.em: New file.
 * testsuite/ld-aarch64/aarch64-nto.exp: New test.
 * testsuite/ld-aarch64/nto-stack-note-1.d: New test.
 * testsuite/ld-aarch64/nto-stack-note-2.d: New test.
 * testsuite/ld-aarch64/start.s: New test.

8a1f599... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

readelf: add support for QNT_STACK note subsections

QNX provides some .note subsections. QNT_STACK is the one controling
the stack allocation.

bfd/ChangeLog:

 * elf.c (BFD_QNT_CORE_INFO): Delete.
 (BFD_QNT_CORE_STATUS): Likewise.
 (BFD_QNT_CORE_GREG): Likewise.
 (BFD_QNT_CORE_FPREG): Likewise.
 (elfcore_grok_nto_note): Replace BFD_QNT_* by QNT_*.

binutils/ChangeLog:

 * readelf.c (get_qnx_elfcore_note_type): New function.
 (print_qnx_note): New function.
 (process_note): Add support for QNX support.

include/ChangeLog:

 * elf/common.h (QNT_DEBUG_FULLPATH): New define.
 (QNT_DEBUG_RELOC): New define.
 (QNT_STACK): New define.
 (QNT_GENERATOR): New define.
 (QNT_DEFAULT_LIB): New define.
 (QNT_CORE_SYSINFO): New define.
 (QNT_CORE_INFO): New define.
 (QNT_CORE_STATUS): New define.
 (QNT_CORE_GREG): New define.
 (QNT_CORE_FPREG): New define.
 (QNT_LINK_MAP): New define.

56b232c... by =?utf-8?q?Cl=C3=A9ment_Chigot?= <email address hidden>

configure: add new target aarch64-*-nto*

This target has its own ld emulation based on aarch64elf.em.

26c294b... by Alan Modra

chew.c printf of intptr_t

Seen when building binutils with gcc -m32 on x86_64-linux.
chew.c: In function ‘print’:
chew.c:1434:59: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘intptr_t’ {aka ‘int’} [-Wformat=]
 1434 | fprintf (stderr, "print: illegal print destination `%ld'\n", *isp);
      | ~~^ ~~~~
      | | |
      | | intptr_t {aka int}
      | long int
      | %d

 * chew.c: Include inttypes.h.
 (print): Use PRIdPTR for *isp.

38395c7... by Mark Harmstone <email address hidden>

ld: Sort section contributions in PDB files

Microsoft's DIA library, and thus also MSVC and WinDbg, expects section
contributions to be ordered by section number and offset, otherwise it's
unable to resolve line numbers.

3a850a3... by Alan Modra

Free ecoff debug info

This frees memory associated with the mips ecoff find_nearest_line.

 * elfxx-mips.x (free_ecoff_debug): New function, extracted from..
 (_bfd_mips_elf_read_ecoff_info): ..here. Free ext_hdr earlier.
 Don't clear already NULL fdr.
 (struct mips_elf_find_line): Move earlier.
 (_bfd_mips_elf_close_and_cleanup): Call free_ecoff_debug.
 (_bfd_mips_elf_find_nearest_line): Likewise on error paths,
 and to clean up input_debug when done.