Commit: Better caching in elf_find_function

Nick Clifton nickc@redhat.com
Fri Feb 24 12:25:29 GMT 2023


Hi Alan,

> Failures are seen on mips targets.
> 
> mipsel-linux-gnu  +FAIL: MIPS PIC relocation 6 (MIPS16)

*sigh* I had noticed these, but thought that they were due to an unrelated problem.  :-(

> The first failure is due to this symbol
>       4: 00000000     0 NOTYPE  LOCAL  DEFAULT [MIPS16]     1 $LCL
> being chosen rather than
>      11: 00000000    32 FUNC    GLOBAL DEFAULT [MIPS16]     1 foo
> for an error on the first address of foo.  Even if the address fit is
> better, I think a NOTYPE LOCAL ought to not be chosen over a
> FUNC GLOBAL.

Agreed.

I am checking in the attached patch to address this problem.  It prefers
function symbols over non-function symbols and typed symbols over notype
symbols.  I was not sure if we should prefer LOCAL symbols over GLOBALS
so I did not add code for that.

Cheers
   Nick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: elf-find-function.patch.2
Type: application/x-troff-man
Size: 3046 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20230224/628afb07/attachment.2>


More information about the Binutils mailing list