https://sourceware.org/bugzilla/show_bug.cgi?id=33389
--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b27a220321ecead5435b170f1db02f1876cee08 commit 6b27a220321ecead5435b170f1db02f1876cee08 Author: H.J. Lu <[email protected]> Date: Sat Sep 6 20:28:13 2025 -0700 objdump: Check the SEC_CODE bit for code If a shared library has $ readelf -D -sW x.so | grep _PROCEDURE_LINKAGE_TABLE_ 3: 00000000000002c0 0 OBJECT GLOBAL DEFAULT 5 _PROCEDURE_LINKAGE_TABLE_ $ Disassembler treats PLT0 as data: $ objdump -dw x.so x.so: file format elf64-x86-64 Disassembly of section .plt: 00000000000002c0 <_PROCEDURE_LINKAGE_TABLE_>: 2c0: ff 35 7a 01 10 00 ff 25 7c 01 10 00 0f 1f 40 00 .5z....%|.....@. 00000000000002d0 <foo@plt>: 2d0: ff 25 7a 01 10 00 jmp *0x10017a(%rip) # 100450 <foo> 2d6: 68 00 00 00 00 push $0x0 2db: e9 e0 ff ff ff jmp 2c0 <_PROCEDURE_LINKAGE_TABLE_> Disassembly of section .text: 00000000000002e0 <func>: 2e0: e8 eb ff ff ff call 2d0 <foo@plt> 2e5: c3 ret Check the SEC_CODE bit on section for code. PR binutils/33389 * objdump.c (disassemble_section): Check SEC_CODE for code. Signed-off-by: H.J. Lu <[email protected]> -- You are receiving this mail because: You are on the CC list for the bug.
