summaryrefslogtreecommitdiff
path: root/usrbin/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usrbin/Makefile')
-rw-r--r--usrbin/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/usrbin/Makefile b/usrbin/Makefile
index 16a607f..9a40cbc 100644
--- a/usrbin/Makefile
+++ b/usrbin/Makefile
@@ -4,7 +4,7 @@ SRCS = $(wildcard *.c)
ASMS = $(wildcard *.s)
OBJS = $(SRCS:.c=.o) $(ASMS:.s=.o)
-CFLAGS = -m32 -I../include -ffreestanding -nostdinc -nostdlib -fno-stack-protector -fno-pie
+CFLAGS = -m32 -I../include -ffreestanding -nostdinc -nostdlib -fno-stack-protector -fno-pie -g
LDFLAGS = -m elf_i386 -T link.ld
ASMFLAGS = -f elf32
@@ -24,7 +24,10 @@ build: $(TARGET)
$(TARGET): $(OBJS)
$(LD) -o usrbin.bin $(OBJS)
- objcopy -I binary -O elf32-i386 -B i386 usrbin.bin $(TARGET)
+ objcopy -I binary -O elf32-i386 -B i386 usrbin.bin $(TARGET) \
+ --redefine-sym _binary_usrbin_bin_start=_usrbin_start \
+ --redefine-sym _binary_usrbin_bin_end=_usrbin_end \
+ --redefine-sym _binary_usrbin_bin_size=_usrbin_size
clean:
rm -f usrbin.bin