ld.bfd in binutils 2.34+ now reports an error in more cases for custom
ldscripts that do not place PHDRs in a LOAD segment. However, EFI
binaries are not dynamic binaries which need PHDRs, so pass
--no-dynamic-linker to disable this check.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
we're starting to accumulate a rather long laundry list of things here... Its OK, ish, but it seems like it might be better in something like stand/efi/Makefile.inc...
If you view boot1 as something that will eventually get removed then you are down to only one place that this will live in the future. I think part of the problem is that you don't want this in LDFLAGS for all subdirs of stand/efi, so you'd have to have some helper var to request stand/efi/Makefile.inc to append these settings to LDFLAGS and that starts getting a bit cumbersome and obtuse.
stand/efi/boot1/Makefile | ||
---|---|---|
3 | This includes stand/efi/Makefile.inc which includes stand/Makefile.inc which includes "defs.mk" which includes <bsd.linker.mk>. | |
stand/efi/loader/Makefile | ||
100 | This should maybe use EFISRC like boot1/Makefile does. And actually, it's kind of odd as "../loader/" is a no-op. |
boot1 likely won't go away given the need for gptboot for some environments...
I was thinking of defining some additional LD flags that both boot1 and loader's makefiles could add to their LDFLAGS, but I think that's beyond the scope of this patch and is something I can look at afterwards.
stand/efi/loader/Makefile | ||
---|---|---|
100 | we include this makefile for each of the 3 different interpreters we build for, so in those includes, ../loader is not a nop. |
stand/efi/loader/Makefile | ||
---|---|---|
100 | Fair enough, using EFISRC like boot1/Makefile is probably cleaner though overall. |