Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107169820
D47176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47176.diff
View Options
diff --git a/sys/tools/amd64_ia32_vdso.sh b/sys/tools/amd64_ia32_vdso.sh
--- a/sys/tools/amd64_ia32_vdso.sh
+++ b/sys/tools/amd64_ia32_vdso.sh
@@ -34,9 +34,14 @@
-o ia32_sigtramp.pico -I. -I"${S}" -include opt_global.h \
"${S}"/amd64/ia32/ia32_sigtramp.S
+if ${LD} --version | ${AWK} '/^GNU ld/{exit 1}' ; then
+ RODYNAMIC="-z rodynamic"
+else
+ RODYNAMIC=""
+fi
${LD} --shared -Bsymbolic -soname="elf-vdso32.so.1" \
-T "${S}"/conf/vdso_amd64_ia32.ldscript \
- --eh-frame-hdr --no-undefined -z rodynamic -z norelro -nmagic \
+ --eh-frame-hdr --no-undefined ${RODYNAMIC} -z norelro -nmagic \
--hash-style=sysv --fatal-warnings --strip-all \
-o elf-vdso32.so.1 ia32_sigtramp.pico
diff --git a/sys/tools/amd64_vdso.sh b/sys/tools/amd64_vdso.sh
--- a/sys/tools/amd64_vdso.sh
+++ b/sys/tools/amd64_vdso.sh
@@ -40,12 +40,17 @@
#
# -z rodynamic is undocumented lld-specific option, seemingly required
# for lld to avoid putting dynamic into dedicated writeable segment,
-# despite ldscript placement. It is ignored by ld.bfd but ldscript
+# despite ldscript placement. It is omitted for ld.bfd, but ldscript
# alone is enough there.
#
+if ${LD} --version | ${AWK} '/^GNU ld/{exit 1}' ; then
+ RODYNAMIC="-z rodynamic"
+else
+ RODYNAMIC=""
+fi
${LD} --shared -Bsymbolic -soname="elf-vdso.so.1" \
-T "${S}"/conf/vdso_amd64.ldscript \
- --eh-frame-hdr --no-undefined -z rodynamic -z norelro -nmagic \
+ --eh-frame-hdr --no-undefined ${RODYNAMIC} -z norelro -nmagic \
--hash-style=sysv --fatal-warnings --strip-all \
-o elf-vdso.so.1 sigtramp.pico
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 4:47 AM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15758854
Default Alt Text
D47176.diff (1 KB)
Attached To
Mode
D47176: amd64: do not pass -z rodynamic to ld.bfd when building vdso
Attached
Detach File
Event Timeline
Log In to Comment