From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 01B293858D3C; Tue, 29 Aug 2023 11:01:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01B293858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1693306916; bh=uWo4kGmYDA5u8Pkq6Ahc99fnGlmcqSCNrJu8bl+ATZU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TzclxcJBbD8bpeMikdfpZ9KRRatNHxies7wlkiQ49OGw9diu9/6Wz5OK1R7W84m/r Vit8/OHo8Bhp29NmCTLmNmA7NDKF6EpC9I7aYfsxkeUT8ZLh/FeKhjxDEFNQwCoGYQ EBZ7wEIfaLFXxFSL1GJc4IwNsi8Lxbk4N+w3wK/c= From: "mark at klomp dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: mark at klomp dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28495 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #6 from Mark Wielaard --- commit 39f2c500542f69c2f1a13fd0ae4eaa5778d2ed8d Author: Mark Wielaard 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=3D28495 Signed-off-by: Mark Wielaard --=20 You are receiving this mail because: You are on the CC list for the bug.=