What's the 'fbsd' linker emulations?

John Baldwin jhb at FreeBSD.org
Wed Jul 25 17:42:17 UTC 2018


On 7/24/18 11:38 AM, Li-Wen Hsu wrote:
> Hi John,
> 
> In https://reviews.freebsd.org/D16319 you talked about 'fbsd' linker
> emulations.  What's that and what we can do to have that for RISC-V?

If you look at the list of linker emulations used in, e.g. sys/conf/kern.mk
you will find that on almost all architectures we have a 'foo_fbsd' linker
emulation rather than using 'foo'.  My guess is that this is used to
specify alternate paths for rtld among other things.

Hmm, looking in binutils they aren't used for the rtld path though but to
set the OSABI in binaries and other things.

This makes me wonder though why your original patch is needed at all.
binutils doesn't use FreeBSD's rtld path for any of its backends.  I believe
the compiler driver always specifies the path to rtld, so I wonder if the
bug was an incorrectly configured/built GCC and the previous patch should
be reverted?

-- 
John Baldwin


More information about the freebsd-riscv mailing list