blob: 0b0cbfe4a7709a22c8ce8b682ba7e070cb6b3e7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
From cf8983d602c56eb31ee0e356df670d9c2876ce15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org>
Date: Sun, 13 Oct 2019 05:25:28 +0200
Subject: [PATCH 7/9] Gentoo: ld: enable new dtags by default for linux/gnu
targets
Original author: Mike Frysinger <vapier@gentoo.org>
The "new" dtags options have been around for 14+ years now, so for Linux
and GNU targets, enable them by default.
2012-01-21 Mike Frysinger <vapier@gentoo.org>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
link_info.new_dtags to TRUE for linux/gnu targets.
* NEWS: Mention new dtags default.
2013-01-22 Roland McGrath <mcgrathr@google.com>
* emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
new_dtags to TRUE for *-*-nacl* targets.
---
ld/emultempl/elf.em | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em
index eac2ce2f4c..7f92134070 100644
--- a/ld/emultempl/elf.em
+++ b/ld/emultempl/elf.em
@@ -81,6 +81,16 @@ gld${EMULATION_NAME}_before_parse (void)
input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+EOF
+
+case ${target} in
+ *-*-linux-* | *-*-k*bsd*-* | *-*-gnu* | *-*-nacl*)
+ fragment <<EOF
+ link_info.new_dtags = TRUE;
+EOF
+ ;;
+esac
+fragment <<EOF
link_info.check_relocs_after_open_input = TRUE;
link_info.relro = DEFAULT_LD_Z_RELRO;
link_info.separate_code = DEFAULT_LD_Z_SEPARATE_CODE;
--
2.26.2
|