Fix: Put libraries at end of linker call
This commit is contained in:
parent
b9222eb044
commit
f0b9af28fc
2 changed files with 3 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -44,7 +44,7 @@ build/$(ARCH)/%.o: $(ARCH)/%.[cS] | build/$(ARCH)
|
||||||
|
|
||||||
build/visor.so: $(VISOR_OBJECTS) gnuefi/crt0-efi-$(ARCH).o | build
|
build/visor.so: $(VISOR_OBJECTS) gnuefi/crt0-efi-$(ARCH).o | build
|
||||||
@printf "LD %s\n" $@
|
@printf "LD %s\n" $@
|
||||||
@"$(LD)" $(LDFLAGS) -o $@ gnuefi/crt0-efi-$(ARCH).o $(VISOR_OBJECTS)
|
@"$(LD)" $(LDFLAGS) -o $@ gnuefi/crt0-efi-$(ARCH).o $(VISOR_OBJECTS) $(LIBS)
|
||||||
|
|
||||||
$(VISOR_TARGET): build/visor.so | build
|
$(VISOR_TARGET): build/visor.so | build
|
||||||
@printf "ELF->PE %s\n" $@
|
@printf "ELF->PE %s\n" $@
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,5 @@ LD = ld
|
||||||
# Compilation flags
|
# Compilation flags
|
||||||
CFLAGS = -std=c17 -Wall -ffreestanding -fpic -nostdlib -fno-stack-protector -fno-stack-check -fshort-wchar -mno-red-zone -maccumulate-outgoing-args -mno-sse -mno-mmx -mno-80387
|
CFLAGS = -std=c17 -Wall -ffreestanding -fpic -nostdlib -fno-stack-protector -fno-stack-check -fshort-wchar -mno-red-zone -maccumulate-outgoing-args -mno-sse -mno-mmx -mno-80387
|
||||||
CPPFLAGS = -Ignuefi/inc
|
CPPFLAGS = -Ignuefi/inc
|
||||||
LDFLAGS = -shared -Bsymbolic -Lgnuefi -lgnuefi -lefi -Tgnuefi/elf_$(ARCH)_efi.lds -nostdlib
|
LDFLAGS = -shared -Bsymbolic -Lgnuefi -Tgnuefi/elf_$(ARCH)_efi.lds -nostdlib
|
||||||
|
LIBS = -lgnuefi -lefi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue