| @@ -75,22 +75,25 @@ along with GCC; see the file COPYING3. | | | @@ -75,22 +75,25 @@ along with GCC; see the file COPYING3. |
75 | | | 75 | |
76 | #define NETBSD_LINK_SPEC_ELF \ | | 76 | #define NETBSD_LINK_SPEC_ELF \ |
77 | "%{assert*} %{R*} %{rpath*} \ | | 77 | "%{assert*} %{R*} %{rpath*} \ |
78 | %{shared:-shared} \ | | 78 | %{shared:-shared} \ |
79 | %{symbolic:-Bsymbolic} \ | | 79 | %{symbolic:-Bsymbolic} \ |
80 | %{!shared: \ | | 80 | %{!shared: \ |
81 | -dc -dp \ | | 81 | -dc -dp \ |
82 | %{!nostdlib: \ | | 82 | %{!nostdlib: \ |
83 | %{!r: \ | | 83 | %{!r: \ |
84 | %{!e*:-e %(netbsd_entry_point)}}} \ | | 84 | %{!e*:-e %(netbsd_entry_point)}}} \ |
85 | %{!static: \ | | 85 | %{!static: \ |
86 | %{rdynamic:-export-dynamic} \ | | 86 | %{rdynamic:-export-dynamic} \ |
87 | -dynamic-linker /usr/libexec/ld.elf_so} \ | | 87 | -dynamic-linker /usr/libexec/ld.elf_so} \ |
88 | %{static:-static}}" | | 88 | %{static:-static}} \ |
| | | 89 | %{!nostdlib:%{!nodefaultlibs:\ |
| | | 90 | %{%:sanitize(address): -lasan } \ |
| | | 91 | %{%:sanitize(undefined): -lubsan}}}" |
89 | | | 92 | |
90 | /* Use --as-needed -lgcc_s for eh support. */ | | 93 | /* Use --as-needed -lgcc_s for eh support. */ |
91 | #ifdef HAVE_LD_AS_NEEDED | | 94 | #ifdef HAVE_LD_AS_NEEDED |
92 | #define USE_LD_AS_NEEDED 1 | | 95 | #define USE_LD_AS_NEEDED 1 |
93 | #endif | | 96 | #endif |
94 | | | 97 | |
95 | #undef TARGET_UNWIND_TABLES_DEFAULT | | 98 | #undef TARGET_UNWIND_TABLES_DEFAULT |
96 | #define TARGET_UNWIND_TABLES_DEFAULT true | | 99 | #define TARGET_UNWIND_TABLES_DEFAULT true |