Compile user binary to map text without W and data without X
Use the flags in elf header to set vm permissions Modify pgbug() so that usertests text segment is without W Add test to check app cannot write text segment
This commit is contained in:
parent
2175c6b0b6
commit
cef1b57d4a
3 changed files with 49 additions and 11 deletions
2
Makefile
2
Makefile
|
@ -90,7 +90,7 @@ tags: $(OBJS) _init
|
|||
ULIB = $U/ulib.o $U/usys.o $U/printf.o $U/umalloc.o
|
||||
|
||||
_%: %.o $(ULIB)
|
||||
$(LD) $(LDFLAGS) -N -e _main -Ttext 0 -o $@ $^
|
||||
$(LD) $(LDFLAGS) -verbose -e _main -Ttext 0 -o $@ $^
|
||||
$(OBJDUMP) -S $@ > $*.asm
|
||||
$(OBJDUMP) -t $@ | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > $*.sym
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue