]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: Add warning message to readelf for local symbols
authorAlan Modra <amodra@gmail.com>
Mon, 8 Dec 2025 09:14:35 +0000 (19:44 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 8 Dec 2025 20:53:34 +0000 (07:23 +1030)
Limit the warning to ET_REL.

binutils/readelf.c

index 9e89a54174e260ddcf272fda7a3caf3095030da5..5c1d05a8ba3332b0bd46268cb62727ea8f564e4c 100644 (file)
@@ -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