Contents of /trunk/glibc/patches/glibc-2.25-binutils229.patch
Parent Directory | Revision Log
Revision 2969 -
(show annotations)
(download)
Mon Aug 14 11:50:19 2017 UTC (7 years, 1 month ago) by niro
File size: 2250 byte(s)
Mon Aug 14 11:50:19 2017 UTC (7 years, 1 month ago) by niro
File size: 2250 byte(s)
-fix ftbfs with newer binutils
1 | commit 388b4f1a02f3a801965028bbfcd48d905638b797 |
2 | Author: H.J. Lu <hjl.tools@gmail.com> |
3 | Date: Fri Jun 23 14:38:46 2017 -0700 |
4 | |
5 | Avoid .symver on common symbols [BZ #21666] |
6 | |
7 | The .symver directive on common symbol just creates a new common symbol, |
8 | not an alias and the newer assembler with the bug fix for |
9 | |
10 | https://sourceware.org/bugzilla/show_bug.cgi?id=21661 |
11 | |
12 | will issue an error. Before the fix, we got |
13 | |
14 | $ readelf -sW libc.so | grep "loc[12s]" |
15 | 5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1 |
16 | 5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2 |
17 | 5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs |
18 | 6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5 |
19 | 7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5 |
20 | 7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5 |
21 | |
22 | in libc.so. The versioned loc1, loc2 and locs have the wrong addresses. |
23 | After the fix, we got |
24 | |
25 | $ readelf -sW libc.so | grep "loc[12s]" |
26 | 6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5 |
27 | 7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5 |
28 | 7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5 |
29 | |
30 | [BZ #21666] |
31 | * misc/regexp.c (loc1): Add __attribute__ ((nocommon)); |
32 | (loc2): Likewise. |
33 | (locs): Likewise. |
34 | |
35 | diff --git a/misc/regexp.c b/misc/regexp.c |
36 | index 19d76c0c37..eaea7c3b89 100644 |
37 | --- a/misc/regexp.c |
38 | +++ b/misc/regexp.c |
39 | @@ -29,14 +29,15 @@ |
40 | |
41 | #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) |
42 | |
43 | -/* Define the variables used for the interface. */ |
44 | -char *loc1; |
45 | -char *loc2; |
46 | +/* Define the variables used for the interface. Avoid .symver on common |
47 | + symbol, which just creates a new common symbol, not an alias. */ |
48 | +char *loc1 __attribute__ ((nocommon)); |
49 | +char *loc2 __attribute__ ((nocommon)); |
50 | compat_symbol (libc, loc1, loc1, GLIBC_2_0); |
51 | compat_symbol (libc, loc2, loc2, GLIBC_2_0); |
52 | |
53 | /* Although we do not support the use we define this variable as well. */ |
54 | -char *locs; |
55 | +char *locs __attribute__ ((nocommon)); |
56 | compat_symbol (libc, locs, locs, GLIBC_2_0); |
57 | |
58 |