[PATCH] RISC-V: fix linker message when relaxation deletes bytes
Jeff Law
jeffreyalaw@gmail.com
Wed Oct 19 17:38:27 GMT 2022
On 10/17/22 02:32, Clément Chigot wrote:
>
> Yeah, that's what was already done in the Risc-V function:
> riscv_relax_delete_bytes.
> However, local and global symbols aren't enough for linker warnings
> and errors. These ones are using the "outsymbols" BFD field which IIUC
> is reading the object files directly and thus cannot know about the
> deleted bytes.
But if you're getting the outsymbols for the output bfd, then they
should have the right address. If they don't, then the symbol table in
the output file is going to be wrong. And changing the local/global
symbols when relaxing should directly influence the outsymbols for the
output bfd.
> So I guess H8 might have the same kind of errors. Are ld-undefined
> tests succeeding ?
Which test specifically? None are failing, but some are
UNTESTED/UNSUPPORTED:
UNSUPPORTED: -shared --entry foo archive
UNSUPPORTED: -shared --entry foo -u foo archive
UNTESTED: undefined
UNTESTED: undefined function
UNTESTED: undefined line
UNSUPPORTED: undefined symbols in shared lib
UNSUPPORTED: weak undefined function symbols in shared lib
Do I need to turn on relaxing by default to see this issue (unlike
riscv, h8 does not enable relaxing by default).
jeff
More information about the Binutils
mailing list