summaryrefslogtreecommitdiff
path: root/usrbin
diff options
context:
space:
mode:
Diffstat (limited to 'usrbin')
-rw-r--r--usrbin/Makefile7
-rw-r--r--usrbin/link.ld2
2 files changed, 6 insertions, 3 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
diff --git a/usrbin/link.ld b/usrbin/link.ld
index c1a7a42..57edac9 100644
--- a/usrbin/link.ld
+++ b/usrbin/link.ld
@@ -1,7 +1,7 @@
OUTPUT_FORMAT(binary)
SECTIONS
{
- . = 0x100000;
+ . = 0x40000000;
.text : { *(.entry); .*(.text) }
.data : { *(.data) }
.bss : { *(.bss) }