aboutsummaryrefslogtreecommitdiff
path: root/ld/ldelf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-10-21 17:02:06 +1030
committerAlan Modra <amodra@gmail.com>2021-10-21 22:09:21 +1030
commit84714f86b37ae36fedca2c0936c7d274a4000900 (patch)
tree443b0edc5e874b7b6220256863458f97f4ee5ecf /ld/ldelf.c
parentf4efb229b72a133c6a5472ebbf484f5207dc0e56 (diff)
downloadfsf-binutils-gdb-84714f86b37ae36fedca2c0936c7d274a4000900.zip
fsf-binutils-gdb-84714f86b37ae36fedca2c0936c7d274a4000900.tar.gz
fsf-binutils-gdb-84714f86b37ae36fedca2c0936c7d274a4000900.tar.bz2
Avoid -Waddress warnings in readelf
Mainline gcc: readelf.c: In function 'find_section': readelf.c:349:8: error: the comparison will always evaluate as 'true' for the pointer operand in 'filedata->section_headers + (sizetype)((long unsigned int)i * 80)' must not be NULL [-Werror=address] 349 | ((X) != NULL \ | ^~ readelf.c:761:9: note: in expansion of macro 'SECTION_NAME_VALID' 761 | if (SECTION_NAME_VALID (filedata->section_headers + i) | ^~~~~~~~~~~~~~~~~~ This will likely be fixed in gcc, but inline functions are nicer than macros. * readelf.c (SECTION_NAME, SECTION_NAME_VALID), (SECTION_NAME_PRINT, VALID_SYMBOL_NAME, VALID_DYNAMIC_NAME), (GET_DYNAMIC_NAME): Delete. Replace with.. (section_name, section_name_valid, section_name_print), (valid_symbol_name, valid_dynamic_name, get_dynamic_name): ..these new inline functions. Update use throughout file.
Diffstat (limited to 'ld/ldelf.c')
0 files changed, 0 insertions, 0 deletions