[PATCH 0/7] kvx: New port.
Paul Iannetta
piannetta@kalrayinc.com
Wed Jul 26 07:36:23 GMT 2023
Hi Nick,
Thank you for the review.
On Tue, Jul 25, 2023 at 03:13:29PM +0100, Nick Clifton wrote:
> Hi Paul,
>
> > > I tried compiling the binutils for a kvx-elf target with your
> > > patches applied and I ran across a compile time warning/error:
> >
> > Yes, indeed, it was more of a convenience macro but it is not well
> > supported by gcc13+, that's the only location it is used so you can
> > safely comment out those lines and I will remove them as well.
>
> Ok, so with that down, the port compiles. But then there are some unexpected
> failures in the gas testsuite:
>
> FAIL: .set with IFUNC
> FAIL: elf type list
> FAIL: elf type-2 list
>
> Which are all due to the fact that the kvx port does not support indirect
> functions:
>
> gas/testsuite/gas/elf/ifunc-1.s: Assembler messages:
> gas/testsuite/gas/elf/ifunc-1.s:9: Error: unrecognized symbol type "gnu_indirect_function"
>
> I suggest updating the list of targets-that-do-not-support-ifuncs starting
> at line 237 of gas/testsuite/gas/elf/elf.exp to fix this.
>
> There are similar problems with the binutils testsuite:
>
> FAIL: nm --ifunc-chars (assembly)
> FAIL: weaken STB_GNU_UNIQUE symbols
> FAIL: strip on STB_GNU_UNIQUE
>
> Tweaks to proc supports_gnu_osabi in binutils/testsuite/lib/binutils-common.exp
> and binutils/testsuite/binutils-all/nm.exp should fix these.
>
Indeed, we do not support indirect functions for now, I'll fix that.
> Finally there are quite a few failures in the linker testsuite:
>
> FAIL: --export-dynamic-symbol foo archive
> FAIL: -u --export-dynamic-symbol foo archive
> FAIL: -u --export-dynamic-symbol "f*" archive
> FAIL: --export-dynamic-symbol-list foo archive
> FAIL: -u --export-dynamic-symbol-list foo bar archive
> FAIL: -u --export-dynamic-symbol-list fstar archive
> FAIL: pr26580-2
> FAIL: Build pr22471
> FAIL: DT_TEXTREL map file warning
> FAIL: Build pr22150
> FAIL: Build pr25458
> FAIL: pr20995
> FAIL: --gc-sections with __gxx_personality
> FAIL: ld-scripts/fill
>
> Six of these can be fixed by updating proc check_pie_support in binutils/testsuite/
> lib/binutils-common.exp. Interestingly patch 2/7 added a test to this proc, but
> limited it to the kvx-*-cos target. Which is odd since it appears to be a problem
> for all kvx targets.
Thanks.
>
> Most of the remaining failures appear to be due to this error:
>
> error: PHDR segment not covered by LOAD segment
>
> Which I am guessing is due to some kind of issue with the built in linker script
> for the KVX target. Although I am not sure exactly what the issue might be.
>
This one is due to the fact that we do not generate a PHDR at all
since we only support a very primitive form of dynamic loading (only
through calls to dlopen/dlsym), we do not need a PHDR. I'll could add
one if needed.
We have also been using the `--enable-warn-rwx-segments=no' switch.
But I don't think it will be a problem for the testsuite.
>
> All of which is to say - please could you submit a v2 patch series with these
> issues resolved and your other updates integrated, and then I will have another
> go at reviewing them. Thanks.
>
I'll reach back to you as soon as I've fixed everything above.
> Cheers
> Nick
>
Thanks,
Paul
More information about the Binutils
mailing list