72 lines
2.8 KiB
Diff
72 lines
2.8 KiB
Diff
diff -rup binutils.orig/ld/emultempl/elf32.em binutils-2.29.1/ld/emultempl/elf32.em
|
|
--- binutils.orig/ld/emultempl/elf32.em 2018-01-16 11:34:58.040749108 +0000
|
|
+++ binutils-2.29.1/ld/emultempl/elf32.em 2018-01-16 11:35:35.697303875 +0000
|
|
@@ -2666,6 +2666,8 @@ fragment <<EOF
|
|
case 'z':
|
|
if (strcmp (optarg, "defs") == 0)
|
|
link_info.unresolved_syms_in_objects = RM_GENERATE_ERROR;
|
|
+ else if (strcmp (optarg, "undefs") == 0)
|
|
+ link_info.unresolved_syms_in_objects = RM_IGNORE;
|
|
else if (strcmp (optarg, "muldefs") == 0)
|
|
link_info.allow_multiple_definition = TRUE;
|
|
else if (CONST_STRNEQ (optarg, "max-page-size="))
|
|
Only in binutils-2.29.1/ld/emultempl: elf32.em.orig
|
|
diff -rup binutils.orig/ld/ld.texinfo binutils-2.29.1/ld/ld.texinfo
|
|
--- binutils.orig/ld/ld.texinfo 2018-01-16 11:34:58.208747127 +0000
|
|
+++ binutils-2.29.1/ld/ld.texinfo 2018-01-16 11:35:35.699303851 +0000
|
|
@@ -1125,8 +1125,9 @@ Generate common symbols with the STT_COM
|
|
link.
|
|
|
|
@item defs
|
|
-Disallows undefined symbols in object files. Undefined symbols in
|
|
-shared libraries are still allowed.
|
|
+Report unresolved symbol references from regular object files. This
|
|
+is done even if the linker is creating a non-symbolic shared library.
|
|
+This option is the inverse of @samp{-z undefs}.
|
|
|
|
@item execstack
|
|
Marks the object as requiring executable stack.
|
|
@@ -1279,6 +1280,11 @@ Generate GNU_PROPERTY_X86_FEATURE_1_SHST
|
|
to indicate compatibility with Intel Shadow Stack. Supported for
|
|
Linux/i386 and Linux/x86_64.
|
|
|
|
+@item undefs
|
|
+Do not report unresolved symbol references from regular object files,
|
|
+either when creating an executable, or when creating a shared library.
|
|
+This option is the inverse of @samp{-z defs}.
|
|
+
|
|
@end table
|
|
|
|
Other keywords are ignored for Solaris compatibility.
|
|
@@ -1684,6 +1690,7 @@ while linking a large executable.
|
|
|
|
@kindex --no-undefined
|
|
@kindex -z defs
|
|
+@kindex -z undefs
|
|
@item --no-undefined
|
|
@itemx -z defs
|
|
Report unresolved symbol references from regular object files. This
|
|
@@ -1692,6 +1699,8 @@ The switch @option{--[no-]allow-shlib-un
|
|
behaviour for reporting unresolved references found in shared
|
|
libraries being linked in.
|
|
|
|
+The effects of this option can be reverted by using @code{-z undefs}.
|
|
+
|
|
@kindex --allow-multiple-definition
|
|
@kindex -z muldefs
|
|
@item --allow-multiple-definition
|
|
Only in binutils-2.29.1/ld: ld.texinfo.orig
|
|
diff -rup binutils.orig/ld/NEWS binutils-2.29.1/ld/NEWS
|
|
--- binutils.orig/ld/NEWS 2018-01-16 11:34:58.209747115 +0000
|
|
+++ binutils-2.29.1/ld/NEWS 2018-01-16 11:35:57.855041557 +0000
|
|
@@ -1,5 +1,7 @@
|
|
-*- text -*-
|
|
|
|
+* Add "-z undefs" command line option as the inverse of the "-z defs" option.
|
|
+
|
|
Changes in 2.29:
|
|
|
|
* Support for -z shstk in the x86 ELF linker to generate
|
|
Only in binutils-2.29.1/ld: NEWS.orig
|
|
Only in binutils-2.29.1/ld: NEWS.rej
|