summaryrefslogtreecommitdiff
path: root/gold/token.h
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2017-03-20 15:32:34 +0100
committerMark Wielaard <mark@klomp.org>2017-03-20 18:19:16 +0100
commit39e224f6f9ee3f6123d4c9ddb7c0955e0604c1b4 (patch)
tree8fb677251b5ca43ce7ca6339c51dab096163a78f /gold/token.h
parente406e428dfe9d64e3be0b7a3c1c97c09edc5bdba (diff)
downloadbinutils-gdb-39e224f6f9ee3f6123d4c9ddb7c0955e0604c1b4.tar.gz
readelf: Don't error on .debug files with NOBITS .dynamic section.
The fix for PR binutils/17512 added a check for the dynamic segment being inside the actual ELF file. If not an error message would be produced: readelf: Error: the dynamic segment offset + size exceeds the size of the file Unfortunately for separate debuginfo files it is common for the dynamic segment not being inside the file because the .dynamic section is NOBITS. Since the check is done unconditionally in process_program_headers and process_program_headers is always called (to setup dynamic_addr in case it is needed). The error is produced on any operations done on any .debug file (even if no program headers or the dynamic segment is used). If there are section headers then a cross check is done to see if the .dynamic section is NOBITS in which case dynamic_addr is set to zero without a warning or error (which is then checked first before any operation on the dynamic segement is done). Move the check for the dynamic segment being inside the actual ELF file after the cross check with the section headers to suppress the error for .debug files. binutils/ChangeLog: * readelf.c (process_program_headers): Move dynamic_addr check after .dynamic section cross check.
Diffstat (limited to 'gold/token.h')
0 files changed, 0 insertions, 0 deletions