Unlike lld, ld.bfd does not intuit the default emulation from the
input files.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 44250 Build 41138: arc lint + arc unit
Event Timeline
Comment Actions
IMO it is worth explicitly specify the emulation for amd64 64bit too.
BTW it is strange, I put OUTPUT_ARCH() into the ldscript. Might be, what is needed is OUTPUT_FORMAT() there as well, and then it is better than '-m', IMO.
Comment Actions
Actually, if we don't want to use -m with LD, then I'd rather use CC as the linker instead. gcc -m32 will DTRT and pass the right -m to ld. clang will pass it if needed as well.
Comment Actions
It required passing nostdlib, some magic to avoid linking crt*, and so on. This is why I went with direct ld invocation.
It is really not about passing or not -m, but putting as much setup as possible into linker script.