Commit eecf6c1b authored by Russell King's avatar Russell King

[ARM] Add --no-undefined to linker command line.

Many binutils versions over the last year appear to silently build
assembler files with undefined constants, and able to successfully
create executables from such files.  The assembler appears to add
undefined symbols to the symbol table without any corresponding
relocation information.  Obviously this is bad news since the
resulting executable may not be what the programmer intended.
Work around the problem by forcing the linker to fail if there are
any undefined symbols in the final object(s).
parent 162ed082
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# Copyright (C) 1995-2001 by Russell King # Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=-p -X LDFLAGS_vmlinux :=-p --no-undefined -X
LDFLAGS_BLOB :=--format binary LDFLAGS_BLOB :=--format binary
AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) AFLAGS_vmlinux.lds.o = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
......
...@@ -66,7 +66,7 @@ targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o \ ...@@ -66,7 +66,7 @@ targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o \
EXTRA_CFLAGS := -fpic EXTRA_CFLAGS := -fpic
EXTRA_AFLAGS := EXTRA_AFLAGS :=
LDFLAGS_vmlinux := -p -X \ LDFLAGS_vmlinux := -p --no-undefined -X \
$(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment