[binutils-gdb] Re: Add warning message to readelf for local symbols
Alan Modra
amodra@sourceware.org
Mon Dec 8 20:54:22 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f70242a98f91b7f5ec5b375346d8bfa7f9a61c4a
commit f70242a98f91b7f5ec5b375346d8bfa7f9a61c4a
Author: Alan Modra <amodra@gmail.com>
Date: Mon Dec 8 19:44:35 2025 +1030
Re: Add warning message to readelf for local symbols
Limit the warning to ET_REL.
Diff:
---
binutils/readelf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 9e89a54174e..5c1d05a8ba3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -14821,6 +14821,7 @@ print_symbol (Filedata * filedata,
&& ! is_special
&& is_valid
&& psym->st_shndx < filedata->file_header.e_shnum
+ && filedata->file_header.e_type == ET_REL
&& filedata->section_headers != NULL
&& (filedata->section_headers[psym->st_shndx].sh_flags & SHF_MERGE)
&& psym->st_value > filedata->section_headers[psym->st_shndx].sh_size
More information about the Binutils-cvs
mailing list