From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug tools/28495] Add support for SHT_RELR to eu-readelf
Date: Tue, 29 Aug 2023 11:01:54 +0000 [thread overview]
Message-ID: <bug-28495-10460-3oQJ4wILgs@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28495-10460@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=28495
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
commit 39f2c500542f69c2f1a13fd0ae4eaa5778d2ed8d
Author: Mark Wielaard <mark@klomp.org>
Date: Sun Jul 23 23:14:31 2023 +0200
libelf, readelf, elflint: Add RELR support
Handle RELR as defined here:
https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/YT2RrjpMAwAJ
Introduce new ELF_T_RELR Elf_Type and handle it for SHT_RELR. Check
various properties in elflint. Print RELR relocations in
readelf. Just the entries with -U. Just the addresses with -N. And
addresses plus symbol/offsets by default.
Also add a test to check that gelf.h works with the system elf.h.
* libebl/eblsectiontypename.c (ebl_section_type_name): Add RELR
to knownstype.
* libelf/elf32_updatenull.c (updatenull_wrlock): Handle
sh_entsize for SHT_RELR.
* libelf/gelf.h (GElf_Relr): New typedef for Elf64_Relr.
* libelf/gelf_fsize.c (__libelf_type_sizes): Add ELF_T_RELR.
* libelf/gelf_xlate.c (__elf_xfctstom): Likewise.
* libelf/gelf_xlate.h: Add RELR as FUNDAMENTAL.
* libelf/libelf.h (Elf_Type): Add ELF_T_RELR. Add RELR
defines/typedefs if undefined in system elf.h.
* libelf/libelfP.h: Define ELF32_FSZ_RELR and ELF64_FSZ_RELR.
* src/elflint.c (check_reloc_shdr): Check she_entsize for
ELF_T_RELR.
(check_relr): New function.
(check_dynamic): Handle DT_RELR.
(special_sections): Add SHT_RELR.
(check_sections): Call check_relr.
* src/readelf.c (print_relocs): Also accept a Dwfl_Module.
(handle_relocs_relr): New function.
(print_dwarf_addr): Make static and declare early.
(process_elf_file): Pass dwflmod to print_relocs.
(handle_dynamic): Handle DT_RELRSZ and DTRELRENT.
* system-elf-gelf-test.c: New test.
* Makefile.am (TESTS): Add system-elf-gelf-test.
(check_PROGRAMS): Likewise.
(system_elf_gelf_test_CPPFLAGS): New variable.
(system_elf_gelf_test_LDADD): Likewise.
https://sourceware.org/bugzilla/show_bug.cgi?id=28495
Signed-off-by: Mark Wielaard <mark@klomp.org>
--
You are receiving this mail because:
You are on the CC list for the bug.
prev parent reply other threads:[~2023-08-29 11:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 13:47 [Bug tools/28495] New: " fweimer at redhat dot com
2021-10-26 14:58 ` [Bug tools/28495] " mark at klomp dot org
2021-10-26 15:06 ` fweimer at redhat dot com
2023-07-11 16:21 ` ajax at redhat dot com
2023-07-14 14:10 ` mark at klomp dot org
2023-08-24 15:56 ` mark at klomp dot org
2023-08-29 11:01 ` mark at klomp dot org [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-28495-10460-3oQJ4wILgs@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).