Browse Source

Restore -Os flag and add other sections to linker file.

master
Andy Nguyen 10 months ago
parent
commit
548af2ec1a
  1. 2
      payload/Makefile
  2. 6
      payload/linker.x

2
payload/Makefile

@ -3,7 +3,7 @@ OBJS = start.o payload.o @@ -3,7 +3,7 @@ OBJS = start.o payload.o
CC = gcc
OBJCOPY = objcopy
CFLAGS = -isystem freebsd-headers/include -fno-stack-protector
CFLAGS = -isystem freebsd-headers/include -Os -fno-stack-protector
LDFLAGS = -T linker.x -nostdlib -nostartfiles
all: $(TARGET).bin

6
payload/linker.x

@ -6,7 +6,9 @@ ENTRY(_start) @@ -6,7 +6,9 @@ ENTRY(_start)
SECTIONS
{
. = 0x916300000;
.text : { *(.text) }
.text : { *(.text .text.*) }
. = 0x916304000;
.data : { *(.data) }
.rodata : { *(.rodata .rodata.*) }
.data : { *(.data .data.*) }
.bss : { *(.bss .bss.*) }
}

Loading…
Cancel
Save