[PATCH] objdump: Use the SEC_CODE bit only for the section symbol

Jan Beulich jbeulich@suse.com
Tue Sep 9 06:12:26 GMT 2025


On 09.09.2025 00:24, H.J. Lu wrote:
> .got section on Powerpc contains both code and data:
> 
> Disassembly of section .got:
> 
> 000101f0 <.got>:
>    101f0:	02 00 00 00 	.long 0x2
> 	...
>    10200:	21 00 80 4e 	blrl
> 
> 00010204 <_GLOBAL_OFFSET_TABLE_>:
>    10204:	70 01 01 00 00 00 00 00 00 00 00 00                 p...........
> 
> Use the SEC_CODE bit only if the symbol address matches the section start
> address:

Hmm, that's not very helpful. After all ...

> Disassembly of section .plt:
> 
> 00000000000002c0 <_PROCEDURE_LINKAGE_TABLE_>:

... this is a symbol which could easily be stripped off an executable without
harming its functionality, aiui. Do we need targets to convey certain
properties?

What I find also irritating - above you're talking of .got, yet here you're
showing .plt. This will want clarifying.

Jan


More information about the Binutils mailing list