Skip to content

Commit

Permalink
Work around(?) LD error: PHDR segment not covered by LOAD segment
Browse files Browse the repository at this point in the history
Among the changes[1] in GNU ld 2.34 is this note:

* The ld check for "PHDR segment not covered by LOAD segment" is more
  effective, catching cases that were wrongly allowed by previous
  versions of ld.  If you see this error it is likely you are linking
  with a bad linker script or the binary you are building is not
  intended to be loaded by a dynamic loader.  In the latter case
  --no-dynamic-linker is appropriate.

[1]: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=ld/NEWS;hb=refs/heads/binutils-2_34-branch
  • Loading branch information
neuschaefer committed Nov 4, 2024
1 parent 145eb7d commit 046d359
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arcloader_grackle/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LDFLAGS = -mcpu=750 -m32 -n -nostartfiles -nodefaultlibs -Wl,-gc-sections
CFLAGS += -mno-eabi -mno-sdata -Os -ffreestanding
CFLAGS += -Wall -Wextra
DEFINES = -DWITH_STDIO -DBASELIBC_INTERNAL
LDFLAGS += -nostartfiles -nodefaultlibs -L../baselibc
LDFLAGS += -nostartfiles -nodefaultlibs -L../baselibc -Wl,--no-dynamic-linker

LDSCRIPT = of.ld
TARGET = stage1.elf
Expand Down
2 changes: 1 addition & 1 deletion arcloader_unin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LDFLAGS = -mcpu=750 -m32 -n -nostartfiles -nodefaultlibs -Wl,-gc-sections
CFLAGS += -mno-eabi -mno-sdata -Os -ffreestanding
CFLAGS += -Wall -Wextra
DEFINES = -DWITH_STDIO -DBASELIBC_INTERNAL
LDFLAGS += -nostartfiles -nodefaultlibs -L../baselibc
LDFLAGS += -nostartfiles -nodefaultlibs -L../baselibc -Wl,--no-dynamic-linker

LDSCRIPT = of.ld
TARGET = stage1.elf
Expand Down

0 comments on commit 046d359

Please sign in to comment.