This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [ARM-FDPIC 00/12] FDPIC ABI for ARM
Hi Nick,
On 23/03/2018 16:08, Nick Clifton wrote:
Hi Christophe,
As a first pass over this patch set, I applied them to the sources
and ran my regression tests. Unfortunately there were several new
failures:
Thanks for your interest in this patch series.
Checking Binutils in: arm-none-eabi ... LD: 6 done
LD REGRESSION: FDPIC ARM shared library little
LD REGRESSION: FDPIC ARM dynamic executable little
LD REGRESSION: FDPIC ARM shared library big
LD REGRESSION: FDPIC ARM dynamic executable big
LD REGRESSION: FDPIC ARM shared library little endian M profile
LD REGRESSION: FDPIC ARM dynamic executable little endian M profile
Checking Binutils in: armeb-eabi ... LD: 6 done
LD REGRESSION: FDPIC ARM shared library little
LD REGRESSION: FDPIC ARM dynamic executable little
LD REGRESSION: FDPIC ARM shared library big
LD REGRESSION: FDPIC ARM dynamic executable big
LD REGRESSION: FDPIC ARM shared library little endian M profile
LD REGRESSION: FDPIC ARM dynamic executable little endian M profile
It seems that these tests are all failing for the same reason:
ld-new: unrecognised emulation mode: armelf_linux_fdpiceabi
Checking Binutils in: arm-netbsdelf ... GAS: 1 LD: 2 done
GAS REGRESSION: FDPIC relocations
Checking Binutils in: arm-nto ... GAS: 1 done
GAS REGRESSION: FDPIC relocations
Meanwhile these tests fail for a similar, but not quite the same reason:
Fatal error: selected target format 'elf32-littlearm-fdpic' unknown
Would you mind fixing these up please ?
I'm looking at it. All these failures are caused by the tests added by this series.
I did test them on arm-linux-gnueabihf, armeb-linux-gnueabihf and-linux-uclibceabi,
but overlooked testing on arm-eabi and others. As usual, not tested means it
does not work :(
My homework on de-hardcoding things is obviously not complete :)
The simple route would probably be just to skip the tests on those targets,
but I have been trying to do something better, but didn't succeed so far.
Currently, gas sets the OSABI flag to ELFOSABI_ARM_FDPIC if the user
supplied -fdpic. I think this flag should set the linker in the right
mode (fdpic/no-fdpic).
It seems I have to set arm_elf32_fdpic_le_vec as default (targ_defvec in config.bfd),
such that the linker uses that in priority (otherwise arm_elf32_le_vec also
accepts to read an FDPIC object file, but fails to flag it as "FDPIC" (because
elf-object_p is happy with ELFOSABI_NONE).
However, if I do that, the linker then defaults to generating FDPIC files,
and thus breaks arm-linux-gnueabihf, unless I force -m armelf_linux_eabi.
I have looked at other targets, for instance sh adds -m shelf_fd for its fdpic tests.
That's what the patches I have posted do. Is this the only way?
How can I have ld support both models transparently without needing to use -m ?
Thanks,
Christophe
Cheers
Nick
.