[PATCH] x86: Return error for invalid relocation offset

H.J. Lu hjl.tools@gmail.com
Sun Feb 9 07:31:38 GMT 2025


Return error if relocation offset + relocation size > section size.

bfd/

PR ld/32665
* elf32-i386.c (elf_i386_scan_relocs): Return error for invalid
relocation offset.
* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

ld/

PR ld/32665
* testsuite/ld-x86-64/pr32665.err: New file.
* testsuite/ld-x86-64/pr32665.o.bz2: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/32665 test.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Return-error-for-invalid-relocation-offset.patch
Type: text/x-patch
Size: 7766 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250209/f45fd569/attachment-0001.bin>


More information about the Binutils mailing list