PERFORCE change 219760 for review
Robert Watson
rwatson at FreeBSD.org
Mon Nov 12 08:11:51 UTC 2012
http://p4web.freebsd.org/@@219760?ac=10
Change 219760 by rwatson at rwatson_zenith_cl_cam_ac_uk on 2012/11/12 08:11:12
Initialise $gp in cheritest-helper, which means we no longer have
to compile with -G0 (I hope). This should (may) allow us to link
sandboxed components against libraries.
Affected files ...
.. //depot/projects/ctsrd/cheribsd/src/libexec/cheritest-helper/Makefile#4 edit
.. //depot/projects/ctsrd/cheribsd/src/libexec/cheritest-helper/mips64/chsbrt.S#2 edit
.. //depot/projects/ctsrd/cheribsd/src/libexec/cheritest-helper/sandbox.ld#3 edit
Differences ...
==== //depot/projects/ctsrd/cheribsd/src/libexec/cheritest-helper/Makefile#4 (text+ko) ====
@@ -4,7 +4,6 @@
PROG= cheritest-helper
SRCS= cheritest-helper.c chsbrt.S
LDFLAGS+= -Wl,--script=${.CURDIR}/sandbox.ld -nostdlib
-CFLAGS+= -G0 -Wa,-G0
NO_MAN=
#STRIP=
NO_SHARED= yes
==== //depot/projects/ctsrd/cheribsd/src/libexec/cheritest-helper/mips64/chsbrt.S#2 (text+ko) ====
@@ -121,10 +121,7 @@
# registers that aren't explicit or ABI-implied arguments.
#
- #
- # XXXRW: Initialise $gp?
- #
- dla $gp, 0
+ dla $gp, _gp
#
# Invoke MIPS ABI C "invoke" function.
==== //depot/projects/ctsrd/cheribsd/src/libexec/cheritest-helper/sandbox.ld#3 (text+ko) ====
@@ -47,6 +47,9 @@
.bss ALIGN(0x8): { *(.bss) }
.data ALIGN(0x8): { *(.data) }
+ _gp = ALIGN(16) + 0x7ff0;
+ .got : { *(.got.plt) *(.got) }
+
/*
* Force zero-filling of previous segments in generated image.
*/
More information about the p4-projects
mailing list