Compare commits
469 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e050ee6d4 | ||
|
|
10671c0eca | ||
|
|
e0ff142016 | ||
|
|
064736651b | ||
|
|
9f66e09750 | ||
|
|
40bef170ce | ||
|
|
d4dfa51cea | ||
|
|
29b46b6079 | ||
|
|
f40a1175b9 | ||
|
|
ddb3cb864e | ||
|
|
5119f9a9cd | ||
|
|
9600c63b36 | ||
|
|
23b67e31b8 | ||
|
|
f9af6f1a80 | ||
|
|
c5ce1de980 | ||
|
|
29eedae455 | ||
|
|
c546fe6976 | ||
|
|
0608389263 | ||
|
|
f294ebe3ba | ||
|
|
5b0464e961 | ||
|
|
76d42a7875 | ||
|
|
33e6445241 | ||
|
|
108ab4ef7a | ||
|
|
aa57e62e08 | ||
|
|
cc43b90ffc | ||
|
|
a53f464f7d | ||
|
|
60fb2164e5 | ||
|
|
2c4833fe8a | ||
|
|
c228a0153a | ||
|
|
27063804ce | ||
|
|
4c1598168d | ||
|
|
4483836ddc | ||
|
|
848e40ec3a | ||
|
|
735a883933 | ||
|
|
64b8d9de61 | ||
|
|
d7078a903f | ||
|
|
f862eebcff | ||
|
|
04aad048cf | ||
|
|
300293f7e2 | ||
|
|
9e81b24737 | ||
|
|
2ac1ee2a42 | ||
|
|
19f1fc4940 | ||
|
|
f9a1cd84ee | ||
|
|
9de042a279 | ||
|
|
96aece08c1 | ||
|
|
f6c1766b84 | ||
|
|
ca67fa0f89 | ||
|
|
1e5363880e | ||
|
|
aa65e68b95 | ||
|
|
b2a44377f7 | ||
|
|
a4377df024 | ||
|
|
049dc08ca1 | ||
|
|
3c2b6fab82 | ||
|
|
cf3468eb37 | ||
|
|
2b97979d33 | ||
|
|
b52b1c824b | ||
|
|
77d3ccc230 | ||
|
|
001f1473de | ||
|
|
b84449875a | ||
|
|
791874dbf7 | ||
|
|
5c8f89372f | ||
|
|
c1e2857084 | ||
|
|
0f77e6a6c6 | ||
|
|
6152e0d05c | ||
|
|
88532ad57e | ||
|
|
dbb6a2b533 | ||
|
|
01507c9252 | ||
|
|
8748d12378 | ||
|
|
fa3058d5fc | ||
|
|
7888285b10 | ||
|
|
eaff7615a3 | ||
|
|
c6ac23d8f1 | ||
|
|
a9bd5526fa | ||
|
|
384e850d5a | ||
|
|
115547ce07 | ||
|
|
84cee8e828 | ||
|
|
7f4b0bfa04 | ||
|
|
6be32c794e | ||
|
|
87ee448377 | ||
|
|
53dfb5f3d9 | ||
|
|
9c83775c81 | ||
|
|
c4f15b9679 | ||
|
|
6cb8c76a06 | ||
|
|
875ad5b267 | ||
|
|
00b3ac3d67 | ||
|
|
3f77f370f1 | ||
|
|
4fe99c972e | ||
|
|
5d93718856 | ||
|
|
6811ff96a8 | ||
|
|
3e7c1aeff4 | ||
|
|
50a2d13658 | ||
|
|
cc723c198d | ||
|
|
6936dfba5d | ||
|
|
a8edbcb255 | ||
|
|
a9dd5ddc2c | ||
|
|
8e380e50cb | ||
|
|
c0b354c6e6 | ||
|
|
83a75f8fd1 | ||
|
|
fddf5b0c9a | ||
|
|
9242ef0c66 | ||
|
|
9ec20adf80 | ||
|
|
b534deccce | ||
|
|
17373e3782 | ||
|
|
ce64e3b14f | ||
|
|
daff9b01dd | ||
|
|
c697a444a9 | ||
|
|
36cbd09894 | ||
|
|
6043ce66a1 | ||
|
|
27b8ab3195 | ||
|
|
45b6743b78 | ||
|
|
c0e2cc5ed5 | ||
|
|
2175d42ba1 | ||
|
|
42d71d98c8 | ||
|
|
f78741193c | ||
|
|
5d27552da0 | ||
|
|
92824e7d56 | ||
|
|
221d87cb73 | ||
|
|
a363b071f4 | ||
|
|
928e5ff57a | ||
|
|
b769a968b8 | ||
|
|
27dc20eed1 | ||
|
|
d488a923af | ||
|
|
668448a4d3 | ||
|
|
869fd132e6 | ||
|
|
7db94aa6ea | ||
|
|
90d6ac6eba | ||
|
|
aafdbcfc2e | ||
|
|
f5eacb8b02 | ||
|
|
d43bbe0fb5 | ||
|
|
daafbde83e | ||
|
|
c1cad428e0 | ||
|
|
a5425af175 | ||
|
|
5132280190 | ||
|
|
f7f7b9f944 | ||
|
|
b606cdd338 | ||
|
|
4c25ffdf16 | ||
|
|
508b3ee556 | ||
|
|
7206b7ef95 | ||
|
|
137e54debb | ||
|
|
6ab5c9d778 | ||
|
|
4a2b1583b0 | ||
|
|
b30ba09c72 | ||
| 9331510b79 | |||
|
|
f7ce37e465 | ||
|
|
173d8ce283 | ||
|
|
62f9165a13 | ||
|
|
8f1ba5b061 | ||
|
|
05f5ab6f6f | ||
|
|
3b7f3a5c52 | ||
|
|
4196d43202 | ||
|
|
e6b3d1627a | ||
|
|
28255cde1d | ||
|
|
1d05c1f190 | ||
|
|
00415f44d2 | ||
|
|
8cbdd69541 | ||
|
|
b14c746ff8 | ||
|
|
1fe93dadad | ||
|
|
c3cd6c8351 | ||
|
|
de97bb3603 | ||
|
|
329cf6426e | ||
|
|
e8094f532e | ||
|
|
c2d4243912 | ||
|
|
d294fe2ca4 | ||
|
|
88b4953e8b | ||
|
|
13a8e71fad | ||
|
|
a74941f97f | ||
|
|
53e1e785a0 | ||
|
|
ccf531f53d | ||
|
|
fcb20d506b | ||
|
|
78d9a63f8b | ||
|
|
ec1bac1bd2 | ||
|
|
0b1c8753b9 | ||
|
|
b6cd5a80bd | ||
|
|
262733044e | ||
|
|
49f3d832d9 | ||
|
|
4c53cd0d87 | ||
|
|
93b20dcdbf | ||
|
|
41f66d24b8 | ||
|
|
b2ca1be519 | ||
|
|
184c1812b1 | ||
|
|
d0a86e89e0 | ||
|
|
9fe14c4dd6 | ||
|
|
fb35f3c111 | ||
|
|
52ad8b6547 | ||
|
|
f751bb5ce4 | ||
|
|
6502fbec15 | ||
|
|
b094a17b03 | ||
|
|
66740f7362 | ||
|
|
d8e1d9b57a | ||
|
|
6bfd06790b | ||
|
|
3ac2843cab | ||
|
|
66f76524de | ||
|
|
6765525905 | ||
|
|
7ef644fbf6 | ||
|
|
14fb249724 | ||
|
|
78fe7f4703 | ||
|
|
e27610f6a7 | ||
|
|
dd133b6b81 | ||
|
|
92265683bf | ||
|
|
4a4bd90398 | ||
|
|
44cef29673 | ||
|
|
1fb1ae3dd6 | ||
|
|
9ee9ffc894 | ||
|
|
0859b9f54c | ||
|
|
17f6d21f57 | ||
|
|
544bea2339 | ||
|
|
fa2df7c5e7 | ||
|
|
1b1ba83846 | ||
|
|
fc45567d6a | ||
|
|
3b3292ed1e | ||
|
|
fa5c6f55b2 | ||
|
|
4c13eef881 | ||
|
|
7fccd0d7e7 | ||
|
|
2d6725c1a9 | ||
|
|
fae26da53a | ||
|
|
15c0289a28 | ||
|
|
97c0e8e507 | ||
|
|
2749aba2e5 | ||
|
|
107db84d77 | ||
|
|
b223b873be | ||
|
|
f02d283cbb | ||
|
|
9c952780c9 | ||
|
|
c0d31e974b | ||
|
|
467b87538d | ||
|
|
6bd3a0b7c2 | ||
|
|
4a7c8e040b | ||
|
|
c074b4afae | ||
|
|
d685480361 | ||
|
|
b04b2360b7 | ||
|
|
10575a5d52 | ||
|
|
ea9a413173 | ||
|
|
24c5f0f956 | ||
|
|
c13a28efbc | ||
|
|
95c35f80af | ||
|
|
9a25c9f346 | ||
|
|
14b1fc0e7b | ||
|
|
a2393deeee | ||
|
|
893b61d358 | ||
|
|
94be2cd1fb | ||
| 5bb4d15d3c | |||
|
|
5074d55c3d | ||
|
|
5dbfbba047 | ||
|
|
5f97030592 | ||
|
|
df67e06692 | ||
|
|
86336d536a | ||
|
|
9e8ef94636 | ||
|
|
ca8ef33300 | ||
|
|
47508dc848 | ||
|
|
92a1236ab3 | ||
|
|
752fe419ea | ||
|
|
e59cdcdfc5 | ||
|
|
73c2d21c11 | ||
|
|
75c516c6c2 | ||
|
|
50232d48dc | ||
|
|
dcb64b3d34 | ||
|
|
252f93244d |
||
|
|
a2d562c07d | ||
|
|
f4ad5792af | ||
|
|
ffc81ff11e | ||
|
|
01ca902e23 | ||
|
|
d5ffebd3b7 | ||
|
|
9eaca4038a | ||
|
|
6d1ff8eb0b | ||
|
|
90f5896dac | ||
|
|
acab70872f | ||
|
|
24cc8051d1 | ||
|
|
58f355fcc3 | ||
|
|
fba59c4283 | ||
|
|
fb7c644d99 | ||
|
|
c82e600f3f | ||
|
|
3ebde0f76b | ||
|
|
a4b106ec38 | ||
|
|
284ad2a04b | ||
|
|
8b9a64065d | ||
|
|
518691547f | ||
|
|
8d1431acf8 | ||
|
|
f5c84aa932 | ||
|
|
473ccf2683 | ||
|
|
54c8d3242b | ||
|
|
2680508b04 | ||
|
|
0b3adba8ff | ||
|
|
fc998ec612 | ||
|
|
5069c58e30 | ||
|
|
616b9e8e44 | ||
|
|
64cf74e8a3 | ||
|
|
22348da57d | ||
|
|
8e50243c45 | ||
|
|
95e9eaea23 | ||
|
|
3740b5fe3f | ||
|
|
2c6bc398b0 | ||
|
|
fe3f218ee7 | ||
|
|
ba92017b68 | ||
|
|
14a74d027d | ||
|
|
1f73172fe0 | ||
|
|
001cb68e0a | ||
|
|
22c57fab15 | ||
|
|
117b4ee5c2 | ||
|
|
5e669f0402 | ||
|
|
2c147eaf06 | ||
|
|
4594b7d025 | ||
|
|
37d46f62b4 | ||
|
|
eb66e6ad98 | ||
|
|
248005fd4b | ||
|
|
cf75a87f18 | ||
|
|
aa0db47566 | ||
|
|
06dff1c717 | ||
|
|
6becef8c86 | ||
|
|
5368a04b59 | ||
|
|
c58376bae6 | ||
|
|
d8a8efd579 | ||
|
|
8b0542614c | ||
|
|
b0c79a4304 | ||
|
|
6df1ce83dc | ||
|
|
0fc29a6fe4 | ||
|
|
31a5e2d113 | ||
|
|
4504773204 | ||
|
|
565577c240 | ||
|
|
d78b2cccc1 | ||
|
|
ae526f4dc7 | ||
|
|
c468b0dfdd | ||
|
|
484107a803 | ||
|
|
9cd058771f | ||
|
|
57106a8254 | ||
|
|
6a906104d9 | ||
|
|
e05b04d76b | ||
|
|
c7ad9ce6c4 | ||
|
|
e429ddcadc | ||
|
|
195ba30ad9 | ||
|
|
a6c5799515 | ||
|
|
7453caeb33 | ||
|
|
ac55f50329 | ||
|
|
0b119dd9d5 | ||
|
|
e184e98697 | ||
|
|
2f53574f32 | ||
|
|
e5b60c3bbb | ||
|
|
2e8b4af2b9 | ||
|
|
e1785a2a4b | ||
|
|
bbafdb8775 | ||
|
|
c014d04d53 | ||
|
|
5cef9601f1 | ||
|
|
34f3e5e618 | ||
| 84771fa58a | |||
|
|
8bb6c79408 | ||
|
|
49b89d94ef | ||
|
|
044ff519e9 | ||
|
|
94c52a6c76 | ||
|
|
1c9437f634 | ||
|
|
da81b23637 | ||
|
|
90ca16a5d6 | ||
|
|
88880dcb05 | ||
|
|
1171dfa950 | ||
|
|
7294ce61bc | ||
|
|
4db8f84f7e | ||
|
|
c29a5d4751 | ||
|
|
433c9b01d4 | ||
|
|
d5e63f6505 | ||
|
|
0960a4713d | ||
|
|
c3a1a4ef17 | ||
|
|
eeeb57f8ed | ||
|
|
e056abea7e | ||
|
|
5aee897b5c | ||
|
|
4b3b7c0eda | ||
|
|
1c6ed47920 | ||
|
|
05722a7935 | ||
|
|
0781ec435c | ||
|
|
b69788edf8 | ||
|
|
c9f1c0ef4c | ||
|
|
2040d52e17 | ||
|
|
540feda45b | ||
|
|
7c556a22c9 | ||
|
|
9138ef7327 | ||
|
|
a4573e9c3e | ||
|
|
611c7aa70b | ||
|
|
63965bc14d | ||
|
|
b5f49511e0 | ||
|
|
a1dc8e2d32 | ||
|
|
45e67f9ccb | ||
|
|
9051ca66fa | ||
|
|
842839bbb1 | ||
|
|
13a86b8b66 | ||
|
|
2592e35890 | ||
|
|
a04d2461fb | ||
|
|
2c9d39bc55 | ||
|
|
7e6a1748ba | ||
|
|
7691c28cb0 | ||
|
|
ba80920a4c | ||
|
|
2e0c2015a5 | ||
|
|
d62f898ae7 | ||
|
|
7bb2daa612 | ||
|
|
e315473f6c | ||
|
|
b22933e83e | ||
|
|
93bf869662 | ||
|
|
6442193bff | ||
|
|
722dceebdb | ||
|
|
a8b0efde87 | ||
|
|
3eb4862ad3 | ||
|
|
74b3ce8462 | ||
|
|
0af851ae02 | ||
|
|
15a78ff3d8 | ||
|
|
5cfc5a91d2 | ||
|
|
385f20222d | ||
|
|
426edf4a6e | ||
|
|
32bf168f75 | ||
|
|
d8ce39864a | ||
|
|
c548afa128 | ||
|
|
347bbd0dc5 | ||
|
|
72f99ab293 | ||
|
|
e8f39243b8 | ||
|
|
d1aeab2109 | ||
|
|
07a3e80865 | ||
|
|
beb7b8e936 | ||
|
|
657e3d5a3e | ||
|
|
bf57373ec8 | ||
|
|
dcf3d266fa | ||
|
|
7111265a8a | ||
|
|
07a2a5840d | ||
|
|
c2688f2fa0 | ||
|
|
86b5dd655f | ||
|
|
2ea649d73a | ||
|
|
18a3e8b612 | ||
|
|
b0bbc38aef | ||
|
|
1a47df5d0d | ||
|
|
dd47049996 | ||
|
|
11b5d51d94 | ||
|
|
31bd4965ad | ||
|
|
70ab9c2b90 | ||
|
|
6f8976d0f9 | ||
|
|
60374778c3 | ||
|
|
6a63423c37 | ||
|
|
79f83cf3ce | ||
|
|
1f0862a7b6 | ||
|
|
9dc3a9d58c | ||
|
|
f3c54369c5 | ||
|
|
9b3321d433 | ||
|
|
bc6d877ace | ||
|
|
cbe88f3d8f | ||
|
|
6f32c52f03 | ||
|
|
c6c79eaa2c | ||
|
|
6ba705ff04 | ||
|
|
69aed915f7 | ||
|
|
dc5ffb15b6 |
||
|
|
5c29c452de | ||
|
|
3edfd25eae | ||
|
|
c77184d403 | ||
|
|
4890018329 | ||
|
|
0c37d8745b | ||
|
|
b430795c93 | ||
|
|
43332bae43 | ||
|
|
d003e8dd8a | ||
|
|
20ffc82c3d | ||
|
|
bbcde65656 | ||
|
|
68e3eaebed | ||
|
|
2aa9183617 | ||
|
|
9e69a9f1b2 | ||
|
|
673d465538 | ||
|
|
0ae8348359 | ||
|
|
8328d01902 | ||
| 597aff75bf | |||
| bb1823f86e | |||
|
0598fac554 |
|||
|
|
263729c7ef | ||
|
|
a2261d64e8 | ||
|
|
fde96c9add | ||
|
|
b094c0da4a | ||
|
|
2c1a3f99f0 | ||
|
|
4a979a7ca0 | ||
|
|
b25b0811ad | ||
|
|
ae9f9e49b7 | ||
|
|
f62ff52c89 |
44 changed files with 4830 additions and 4898 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
83
.gitignore
vendored
83
.gitignore
vendored
|
|
@ -1,17 +1,70 @@
|
|||
binutils-2.*/
|
||||
i386
|
||||
i686
|
||||
x86_64
|
||||
/binutils-*.tar.bz2
|
||||
.build-*
|
||||
*.src.rpm
|
||||
*.log
|
||||
HOWTO
|
||||
build-sources
|
||||
*.diff
|
||||
*.orig
|
||||
*.rej
|
||||
*.sed
|
||||
*.xz
|
||||
|
||||
/binutils-2.29.tar.xz
|
||||
/binutils-2.29.1.tar.xz
|
||||
*~
|
||||
.#*
|
||||
*#
|
||||
|
||||
*.flt
|
||||
*.gmo
|
||||
*.info
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.pyc
|
||||
*.tmp
|
||||
*.a
|
||||
|
||||
.deps
|
||||
.libs
|
||||
|
||||
autom4te.cache
|
||||
config.cache
|
||||
config.h
|
||||
config.intl
|
||||
config.log
|
||||
config.status
|
||||
libtool
|
||||
POTFILES
|
||||
*-POTFILES
|
||||
|
||||
TAGS
|
||||
TAGS.sub
|
||||
|
||||
.local.vimrc
|
||||
.lvimrc
|
||||
|
||||
.clang-format
|
||||
|
||||
.gdbinit
|
||||
.gdb_history
|
||||
|
||||
perf.data
|
||||
perf.data.old
|
||||
|
||||
# ignore core files, but not java/net/protocol/core/
|
||||
core
|
||||
!core/
|
||||
|
||||
lost+found
|
||||
|
||||
# ignore ./contrib/gcc_update output
|
||||
LAST_UPDATED
|
||||
REVISION
|
||||
|
||||
stamp-*
|
||||
*.stamp
|
||||
|
||||
# ignore in-tree prerequisites
|
||||
/mpfr*
|
||||
/mpc*
|
||||
/gmp*
|
||||
/isl*
|
||||
/binutils-2.19.50.0.1-output-format.sed
|
||||
/binutils-2.30.tar.xz
|
||||
/binutils-2.30.90.tar.xz
|
||||
/binutils-2.31.1.tar.xz
|
||||
/binutils-2.44.50-13.fc43.src.rpm
|
||||
/binutils-with-gold-2.45.50-be970c68891.tar.gz
|
||||
/binutils-with-gold-2.45.50-ba5838a98fb.tar.gz
|
||||
/binutils-2.47.50-1.fc46.src.rpm
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
|
||||
# Imported from glibc/Makerules.
|
||||
|
||||
/ld.*[ ]-E[BL]/b f
|
||||
/collect.*[ ]-E[BL]/b f
|
||||
/OUTPUT_FORMAT[^)]*$/{N
|
||||
s/\n[ ]*/ /
|
||||
}
|
||||
t o
|
||||
: o
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
|
||||
t s
|
||||
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
d
|
||||
: s
|
||||
s/"//g
|
||||
G
|
||||
s/\n//
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
|
||||
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
|
||||
q
|
||||
: q
|
||||
s/"//g
|
||||
p
|
||||
q
|
||||
: f
|
||||
s/^.*[ ]-E\([BL]\)[ ].*$/,\1/
|
||||
t h
|
||||
s/^.*[ ]-E\([BL]\)$/,\1/
|
||||
t h
|
||||
d
|
||||
: h
|
||||
h
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,14 +0,0 @@
|
|||
diff -rup binutils.orig/ld/ldmain.c binutils-2.28/ld/ldmain.c
|
||||
--- binutils.orig/ld/ldmain.c 2017-06-09 09:08:26.954016429 +0100
|
||||
+++ binutils-2.28/ld/ldmain.c 2017-06-09 09:09:11.307490976 +0100
|
||||
@@ -923,6 +923,10 @@ multiple_definition (struct bfd_link_inf
|
||||
obfd = h->u.def.section->owner;
|
||||
break;
|
||||
case bfd_link_hash_indirect:
|
||||
+ /* PR 21074: The GOLD linker can produce multiple indirect
|
||||
+ refences to the same symbol. These can be ignored. */
|
||||
+ if (bfd_is_ind_section (nsec))
|
||||
+ return;
|
||||
osec = bfd_ind_section_ptr;
|
||||
oval = 0;
|
||||
obfd = NULL;
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
--- binutils.orig/binutils/readelf.c 2018-01-22 15:48:10.450701702 +0000
|
||||
+++ binutils-2.30.0/binutils/readelf.c 2018-01-22 15:55:26.739588657 +0000
|
||||
@@ -19019,75 +19019,85 @@ process_file (char * file_name)
|
||||
Filedata * filedata = NULL;
|
||||
struct stat statbuf;
|
||||
char armag[SARMAG];
|
||||
- bfd_boolean ret = TRUE;
|
||||
+ bfd_boolean ret = FALSE;
|
||||
+ char * name;
|
||||
+ char * saved_program_name;
|
||||
+
|
||||
+ /* Overload program_name to include file_name. Doing this means
|
||||
+ that warning/error messages will positively identify the file
|
||||
+ concerned even when multiple instances of readelf are running. */
|
||||
+ name = xmalloc (strlen (program_name) + strlen (file_name) + 3);
|
||||
+ sprintf (name, "%s: %s", program_name, file_name);
|
||||
+ saved_program_name = program_name;
|
||||
+ program_name = name;
|
||||
|
||||
if (stat (file_name, &statbuf) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
- error (_("'%s': No such file\n"), file_name);
|
||||
+ error (_("No such file\n"));
|
||||
else
|
||||
- error (_("Could not locate '%s'. System error message: %s\n"),
|
||||
- file_name, strerror (errno));
|
||||
- return FALSE;
|
||||
+ error (_("Could not locate file. System error message: %s\n"),
|
||||
+ strerror (errno));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
if (! S_ISREG (statbuf.st_mode))
|
||||
{
|
||||
- error (_("'%s' is not an ordinary file\n"), file_name);
|
||||
- return FALSE;
|
||||
+ error (_("Not an ordinary file\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata = calloc (1, sizeof * filedata);
|
||||
if (filedata == NULL)
|
||||
{
|
||||
error (_("Out of memory allocating file data structure\n"));
|
||||
- return FALSE;
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata->file_name = file_name;
|
||||
filedata->handle = fopen (file_name, "rb");
|
||||
if (filedata->handle == NULL)
|
||||
{
|
||||
- error (_("Input file '%s' is not readable.\n"), file_name);
|
||||
- free (filedata);
|
||||
- return FALSE;
|
||||
+ error (_("Not readable\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
if (fread (armag, SARMAG, 1, filedata->handle) != 1)
|
||||
{
|
||||
- error (_("%s: Failed to read file's magic number\n"), file_name);
|
||||
- fclose (filedata->handle);
|
||||
- free (filedata);
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- filedata->file_size = (bfd_size_type) statbuf.st_size;
|
||||
-
|
||||
- if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
- {
|
||||
- if (! process_archive (filedata, FALSE))
|
||||
- ret = FALSE;
|
||||
- }
|
||||
- else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
- {
|
||||
- if ( ! process_archive (filedata, TRUE))
|
||||
- ret = FALSE;
|
||||
+ error (_("Failed to read file's magic number\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (do_archive_index)
|
||||
- error (_("File %s is not an archive so its index cannot be displayed.\n"),
|
||||
- file_name);
|
||||
+ filedata->file_size = (bfd_size_type) statbuf.st_size;
|
||||
|
||||
- rewind (filedata->handle);
|
||||
- archive_file_size = archive_file_offset = 0;
|
||||
-
|
||||
- if (! process_object (filedata))
|
||||
- ret = FALSE;
|
||||
+ if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
+ {
|
||||
+ if (process_archive (filedata, FALSE))
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
+ else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
+ {
|
||||
+ if (process_archive (filedata, TRUE))
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (do_archive_index)
|
||||
+ error (_("Not an archive so its index cannot be displayed.\n"));
|
||||
+
|
||||
+ rewind (filedata->handle);
|
||||
+ archive_file_size = archive_file_offset = 0;
|
||||
+
|
||||
+ if (process_object (filedata))
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
}
|
||||
|
||||
fclose (filedata->handle);
|
||||
+ done:
|
||||
free (filedata);
|
||||
+ free (program_name);
|
||||
+ program_name = saved_program_name;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
diff -rup binutils.orig/bfd/Makefile.am binutils-2.30.90/bfd/Makefile.am
|
||||
--- binutils.orig/bfd/Makefile.am 2018-07-09 09:49:43.378323137 +0100
|
||||
+++ binutils-2.30.90/bfd/Makefile.am 2018-07-09 09:50:40.252723495 +0100
|
||||
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
|
||||
bfdincludedir = @bfdincludedir@
|
||||
bfdlib_LTLIBRARIES = libbfd.la
|
||||
bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
- $(INCDIR)/bfdlink.h $(INCDIR)/diagnostics.h
|
||||
+ $(INCDIR)/bfdlink.h $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h
|
||||
else !INSTALL_LIBBFD
|
||||
# Empty these so that the respective installation directories will not be created.
|
||||
bfdlibdir =
|
||||
diff -rup binutils.orig/bfd/Makefile.in binutils-2.30.90/bfd/Makefile.in
|
||||
--- binutils.orig/bfd/Makefile.in 2018-07-09 09:49:42.757329685 +0100
|
||||
+++ binutils-2.30.90/bfd/Makefile.in 2018-07-09 09:51:16.145345812 +0100
|
||||
@@ -248,7 +248,7 @@ am__can_run_installinfo = \
|
||||
esac
|
||||
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
|
||||
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h \
|
||||
- $(INCDIR)/diagnostics.h
|
||||
+ $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h
|
||||
HEADERS = $(bfdinclude_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
@@ -467,7 +467,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
|
||||
@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
|
||||
@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
|
||||
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
-@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h \
|
||||
+@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h \
|
||||
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h $(am__append_2)
|
||||
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
|
||||
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
|
||||
154
binutils-LTO-restore-wrapper-symbol.patch
Normal file
154
binutils-LTO-restore-wrapper-symbol.patch
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
From 3221c470f0765886a49a1a3d2ec602e4104a377b Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Fri, 2 Aug 2024 19:52:00 -0700
|
||||
Subject: [PATCH] LTO: Restore the wrapper symbol check for standard function
|
||||
|
||||
Call unwrap_hash_lookup to restore the wrapper symbol check for standard
|
||||
function since reference to standard function may not show up in LTO
|
||||
symbol table:
|
||||
|
||||
[hjl@gnu-tgl-3 pr31956-3]$ nm foo.o
|
||||
00000000 T main
|
||||
U __real_malloc
|
||||
00000000 T __wrap_malloc
|
||||
[hjl@gnu-tgl-3 pr31956-3]$ lto-dump -list foo.o
|
||||
Type Visibility Size Name
|
||||
function default 0 malloc
|
||||
function default 0 __real_malloc
|
||||
function default 3 main
|
||||
function default 5 __wrap_malloc
|
||||
[hjl@gnu-tgl-3 pr31956-3]$ make
|
||||
gcc -O2 -flto -Wall -c -o foo.o foo.c
|
||||
gcc -Wl,--wrap=malloc -O2 -flto -Wall -o x foo.o
|
||||
/usr/local/bin/ld: /tmp/ccsPW0a9.ltrans0.ltrans.o: in function `main':
|
||||
<artificial>:(.text.startup+0xa): undefined reference to `__wrap_malloc'
|
||||
collect2: error: ld returned 1 exit status
|
||||
make: *** [Makefile:22: x] Error 1
|
||||
[hjl@gnu-tgl-3 pr31956-3]$
|
||||
|
||||
Also add a test to verify that the unused wrapper is removed.
|
||||
|
||||
PR ld/31956
|
||||
* plugin.c (get_symbols): Restore the wrapper symbol check for
|
||||
standard function.
|
||||
* testsuite/ld-plugin/lto.exp: Run the malloc test and the
|
||||
unused test.
|
||||
* testsuite/ld-plugin/pr31956c.c: New file.
|
||||
* testsuite/ld-plugin/pr31956d.c: New file.
|
||||
* testsuite/ld-plugin/pr31956d.d: New file.
|
||||
|
||||
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
||||
---
|
||||
ld/plugin.c | 14 ++++++++++++--
|
||||
ld/testsuite/ld-plugin/lto.exp | 16 ++++++++++++++++
|
||||
ld/testsuite/ld-plugin/pr31956c.c | 19 +++++++++++++++++++
|
||||
ld/testsuite/ld-plugin/pr31956d.c | 7 +++++++
|
||||
ld/testsuite/ld-plugin/pr31956d.d | 4 ++++
|
||||
5 files changed, 58 insertions(+), 2 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-plugin/pr31956c.c
|
||||
create mode 100644 ld/testsuite/ld-plugin/pr31956d.c
|
||||
create mode 100644 ld/testsuite/ld-plugin/pr31956d.d
|
||||
|
||||
diff --git a/ld/plugin.c b/ld/plugin.c
|
||||
index 03ee9880d10..51c4765cc5b 100644
|
||||
--- a/ld/plugin.c
|
||||
+++ b/ld/plugin.c
|
||||
@@ -778,8 +778,18 @@ get_symbols (const void *handle, int nsyms, struct ld_plugin_symbol *syms,
|
||||
{
|
||||
blhe = h;
|
||||
/* Check if a symbol is a wrapper symbol. */
|
||||
- if (blhe && blhe->wrapper_symbol)
|
||||
- wrap_status = wrapper;
|
||||
+ if (blhe)
|
||||
+ {
|
||||
+ if (blhe->wrapper_symbol)
|
||||
+ wrap_status = wrapper;
|
||||
+ else if (link_info.wrap_hash != NULL)
|
||||
+ {
|
||||
+ struct bfd_link_hash_entry *unwrap
|
||||
+ = unwrap_hash_lookup (&link_info, (bfd *) abfd, blhe);
|
||||
+ if (unwrap != NULL && unwrap != h)
|
||||
+ wrap_status = wrapper;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
|
||||
index ad59e2abd61..1a8c3736307 100644
|
||||
--- a/ld/testsuite/ld-plugin/lto.exp
|
||||
+++ b/ld/testsuite/ld-plugin/lto.exp
|
||||
@@ -546,6 +546,22 @@ set lto_link_elf_tests [list \
|
||||
{} \
|
||||
"pr31956b" \
|
||||
] \
|
||||
+ [list \
|
||||
+ "PR ld/31956 (malloc)" \
|
||||
+ "-Wl,--wrap=malloc" \
|
||||
+ "-O2 -flto" \
|
||||
+ {pr31956c.c} \
|
||||
+ {} \
|
||||
+ "pr31956c" \
|
||||
+ ] \
|
||||
+ [list \
|
||||
+ "PR ld/31956 (unused)" \
|
||||
+ "-Wl,--wrap=parse_line" \
|
||||
+ "-O2 -flto" \
|
||||
+ {pr31956d.c} \
|
||||
+ {{"nm" {} "pr31956d.d"}} \
|
||||
+ "pr31956d" \
|
||||
+ ] \
|
||||
[list \
|
||||
"Build pr30281.so" \
|
||||
"-shared -Wl,--version-script,pr30281.t \
|
||||
diff --git a/ld/testsuite/ld-plugin/pr31956c.c b/ld/testsuite/ld-plugin/pr31956c.c
|
||||
new file mode 100644
|
||||
index 00000000000..4a46b2b49a8
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr31956c.c
|
||||
@@ -0,0 +1,19 @@
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+extern void *__real_malloc (size_t);
|
||||
+
|
||||
+void *
|
||||
+__wrap_malloc (size_t n)
|
||||
+{
|
||||
+ if (n == 0)
|
||||
+ return NULL;
|
||||
+ else
|
||||
+ return __real_malloc (n);
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ void *ptr = malloc (30);
|
||||
+ return ptr == NULL ? 1 : 0;
|
||||
+}
|
||||
diff --git a/ld/testsuite/ld-plugin/pr31956d.c b/ld/testsuite/ld-plugin/pr31956d.c
|
||||
new file mode 100644
|
||||
index 00000000000..cb7f2d50643
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr31956d.c
|
||||
@@ -0,0 +1,7 @@
|
||||
+void __wrap_parse_line(void) {};
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/ld/testsuite/ld-plugin/pr31956d.d b/ld/testsuite/ld-plugin/pr31956d.d
|
||||
new file mode 100644
|
||||
index 00000000000..b579cdc7353
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr31956d.d
|
||||
@@ -0,0 +1,4 @@
|
||||
+#failif
|
||||
+#...
|
||||
+[0-9a-f]+ T .*parse_line
|
||||
+#...
|
||||
--
|
||||
2.45.2
|
||||
|
||||
12
binutils-aarch64-small-plt0.patch
Normal file
12
binutils-aarch64-small-plt0.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--- binutils.orig/bfd/elfnn-aarch64.c 2025-02-07 13:42:20.961333141 +0000
|
||||
+++ binutils-with-gold-2.44/bfd/elfnn-aarch64.c 2025-02-07 13:42:29.781353740 +0000
|
||||
@@ -10162,7 +10162,8 @@ elfNN_aarch64_init_small_plt0_entry (bfd
|
||||
/* PR 26312: Explicitly set the sh_entsize to 0 so that
|
||||
consumers do not think that the section contains fixed
|
||||
sized objects. */
|
||||
- elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0;
|
||||
+ if (elf_section_data (htab->root.splt->output_section) != NULL)
|
||||
+ elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0;
|
||||
|
||||
plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma
|
||||
+ htab->root.sgotplt->output_offset
|
||||
11
binutils-autoconf-version.patch
Normal file
11
binutils-autoconf-version.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- binutils.orig/config/override.m4 2021-08-31 14:20:17.275574804 +0100
|
||||
+++ binutils-2.37/config/override.m4 2021-08-31 14:36:37.793954247 +0100
|
||||
@@ -41,7 +41,7 @@ dnl Or for updating the whole tree at on
|
||||
AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
|
||||
[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
|
||||
m4_defn([m4_PACKAGE_VERSION]), [],
|
||||
- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
|
||||
+ [])
|
||||
])
|
||||
m4_define([AC_INIT], m4_defn([AC_INIT])[
|
||||
_GCC_AUTOCONF_VERSION_CHECK
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
--- binutils.orig/bfd/elflink.c 2018-08-14 10:25:09.108322746 +0100
|
||||
+++ binutils-2.31.1/bfd/elflink.c 2018-08-14 10:28:45.617780256 +0100
|
||||
@@ -686,13 +686,11 @@ bfd_elf_record_link_assignment (bfd *out
|
||||
&& !h->def_regular)
|
||||
h->root.type = bfd_link_hash_undefined;
|
||||
|
||||
- /* If this symbol is not being provided by the linker script, and it is
|
||||
- currently defined by a dynamic object, but not by a regular object,
|
||||
- then clear out any version information because the symbol will not be
|
||||
- associated with the dynamic object any more. */
|
||||
- if (!provide
|
||||
- && h->def_dynamic
|
||||
- && !h->def_regular)
|
||||
+ /* If this symbol is currently defined by a dynamic object, but not
|
||||
+ by a regular object, then clear out any version information because
|
||||
+ the symbol will not be associated with the dynamic object any
|
||||
+ more. */
|
||||
+ if (h->def_dynamic && !h->def_regular)
|
||||
h->verinfo.verdef = NULL;
|
||||
|
||||
/* Make sure this symbol is not garbage collected. */
|
||||
82
binutils-do-not-link-with-static-libstdc++.patch
Normal file
82
binutils-do-not-link-with-static-libstdc++.patch
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
diff -rup binutils.orig/configure binutils-2.40/configure
|
||||
--- binutils.orig/configure 2023-02-13 14:43:00.728877170 +0000
|
||||
+++ binutils-2.40/configure 2023-02-13 14:43:13.671864892 +0000
|
||||
@@ -5442,49 +5442,6 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||
-have_static_libs=no
|
||||
-if test "$GCC" = yes; then
|
||||
- saved_LDFLAGS="$LDFLAGS"
|
||||
-
|
||||
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
|
||||
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
|
||||
- ac_ext=cpp
|
||||
-ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
-
|
||||
-
|
||||
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
-#error -static-libstdc++ not implemented
|
||||
-#endif
|
||||
-int main() {}
|
||||
-_ACEOF
|
||||
-if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
-$as_echo "yes" >&6; }; have_static_libs=yes
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
-$as_echo "no" >&6; }
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext \
|
||||
- conftest$ac_exeext conftest.$ac_ext
|
||||
- ac_ext=c
|
||||
-ac_cpp='$CPP $CPPFLAGS'
|
||||
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
-
|
||||
-
|
||||
- LDFLAGS="$saved_LDFLAGS"
|
||||
-fi
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
--- binutils.orig/configure.ac 2024-11-26 15:08:50.162328683 +0000
|
||||
+++ binutils-2.43.50-1686dc7079f/configure.ac 2024-11-26 15:08:56.929374527 +0000
|
||||
@@ -1410,26 +1410,6 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||
-have_static_libs=no
|
||||
-if test "$GCC" = yes; then
|
||||
- saved_LDFLAGS="$LDFLAGS"
|
||||
-
|
||||
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||
- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
|
||||
- AC_LANG_PUSH(C++)
|
||||
- AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
-#error -static-libstdc++ not implemented
|
||||
-#endif
|
||||
-int main() {}])],
|
||||
- [AC_MSG_RESULT([yes]); have_static_libs=yes],
|
||||
- [AC_MSG_RESULT([no])])
|
||||
- AC_LANG_POP(C++)
|
||||
-
|
||||
- LDFLAGS="$saved_LDFLAGS"
|
||||
-fi
|
||||
-
|
||||
ACX_PROG_GNAT
|
||||
ACX_PROG_GDC
|
||||
ACX_PROG_CARGO
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
||||
index 444aef2942..8a3858d32b 100644
|
||||
--- a/ld/scripttempl/elf.sc
|
||||
+++ b/ld/scripttempl/elf.sc
|
||||
@@ -637,9 +637,9 @@ cat <<EOF
|
||||
${SDATA_GOT+${OTHER_GOT_SECTIONS}}
|
||||
${DATA_SDATA-${SDATA}}
|
||||
${DATA_SDATA-${OTHER_SDATA_SECTIONS}}
|
||||
- ${RELOCATING+${DATA_END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_edata = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
|
||||
+ ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
|
||||
${RELOCATING+. = .;}
|
||||
- ${RELOCATING+${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}__bss_start = .${CREATE_SHLIB+)};}
|
||||
+ ${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}
|
||||
${RELOCATING+${OTHER_BSS_SYMBOLS}}
|
||||
${DATA_SDATA-${SBSS}}
|
||||
${BSS_PLT+${PLT}}
|
||||
@@ -672,7 +672,7 @@ cat <<EOF
|
||||
${LARGE_BSS_AFTER_BSS-${LARGE_BSS}}
|
||||
${RELOCATING+. = ALIGN(${ALIGNMENT});}
|
||||
${RELOCATING+${OTHER_END_SYMBOLS}}
|
||||
- ${RELOCATING+${END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}${USER_LABEL_PREFIX}_end = .${CREATE_SHLIB+)}; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
|
||||
+ ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
|
||||
${RELOCATING+${DATA_SEGMENT_END}}
|
||||
${TINY_DATA_SECTION}
|
||||
${TINY_BSS_SECTION}
|
||||
33
binutils-export-demangle.h.patch
Normal file
33
binutils-export-demangle.h.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am
|
||||
--- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000
|
||||
+++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000
|
||||
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
|
||||
bfdincludedir = @bfdincludedir@
|
||||
bfdlib_LTLIBRARIES = libbfd.la
|
||||
bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
|
||||
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
|
||||
else !INSTALL_LIBBFD
|
||||
# Empty these so that the respective installation directories will not be created.
|
||||
bfdlibdir =
|
||||
diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in
|
||||
--- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000
|
||||
+++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000
|
||||
@@ -249,7 +249,7 @@ am__can_run_installinfo = \
|
||||
esac
|
||||
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
|
||||
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
|
||||
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
|
||||
HEADERS = $(bfdinclude_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
|
||||
@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
|
||||
@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
|
||||
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
-@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h \
|
||||
+@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h \
|
||||
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(am__append_2)
|
||||
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
|
||||
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
|
||||
11
binutils-fix-ar-test.patch
Normal file
11
binutils-fix-ar-test.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- binutils.orig/binutils/testsuite/binutils-all/ar.exp 2024-02-07 13:02:23.490031197 +0000
|
||||
+++ binutils-2.42/binutils/testsuite/binutils-all/ar.exp 2024-02-07 13:03:10.285034069 +0000
|
||||
@@ -1017,7 +1017,7 @@ symbol_table
|
||||
argument_parsing
|
||||
deterministic_archive
|
||||
replacing_deterministic_member
|
||||
-replacing_non_deterministic_member
|
||||
+# replacing_non_deterministic_member
|
||||
replacing_sde_deterministic_member
|
||||
delete_an_element
|
||||
move_an_element
|
||||
|
|
@ -1,657 +0,0 @@
|
|||
diff -rup binutils.orig/gold/testsuite/Makefile.am binutils-2.30/gold/testsuite/Makefile.am
|
||||
--- binutils.orig/gold/testsuite/Makefile.am 2018-05-31 16:14:12.736538727 +0100
|
||||
+++ binutils-2.30/gold/testsuite/Makefile.am 2018-06-01 10:15:00.936103521 +0100
|
||||
@@ -393,7 +393,7 @@ icf_sht_rel_addend_test: icf_sht_rel_add
|
||||
icf_sht_rel_addend_test.stdout: icf_sht_rel_addend_test
|
||||
$(TEST_NM) icf_sht_rel_addend_test > icf_sht_rel_addend_test.stdout
|
||||
|
||||
-check_PROGRAMS += large_symbol_alignment
|
||||
+# check_PROGRAMS += large_symbol_alignment
|
||||
large_symbol_alignment_SOURCES = large_symbol_alignment.cc
|
||||
large_symbol_alignment_DEPENDENCIES = gcctestdir/ld
|
||||
large_symbol_alignment_LDFLAGS = -Bgcctestdir/
|
||||
@@ -783,7 +783,7 @@ weak_test_DEPENDENCIES = gcctestdir/ld
|
||||
weak_test_LDFLAGS = -Bgcctestdir/
|
||||
weak_test_LDADD =
|
||||
|
||||
-check_PROGRAMS += weak_undef_test
|
||||
+# check_PROGRAMS += weak_undef_test
|
||||
MOSTLYCLEANFILES += alt/weak_undef_lib.so
|
||||
weak_undef_test_SOURCES = weak_undef_test.cc
|
||||
weak_undef_test_DEPENDENCIES = gcctestdir/ld weak_undef_lib.so alt/weak_undef_lib.so
|
||||
@@ -1409,7 +1409,7 @@ initpri2_DEPENDENCIES = gcctestdir/ld
|
||||
initpri2_LDFLAGS = -Bgcctestdir/ -Wl,--ctors-in-init-array
|
||||
initpri2_LDADD =
|
||||
|
||||
-check_PROGRAMS += initpri3a
|
||||
+# check_PROGRAMS += initpri3a
|
||||
initpri3a_SOURCES = initpri3.c
|
||||
initpri3a_DEPENDENCIES = gcctestdir/ld
|
||||
initpri3a_LDFLAGS = -Bgcctestdir/
|
||||
@@ -1897,19 +1897,19 @@ relro_script_test_LDADD = relro_script_t
|
||||
relro_script_test.so: gcctestdir/ld relro_script_test.t relro_test_pic.o
|
||||
$(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -Wl,-T,$(srcdir)/relro_script_test.t relro_test_pic.o
|
||||
|
||||
-check_PROGRAMS += script_test_1
|
||||
+# check_PROGRAMS += script_test_1
|
||||
script_test_1_SOURCES = script_test_1a.cc script_test_1b.cc
|
||||
script_test_1_DEPENDENCIES = gcctestdir/ld script_test_1.t
|
||||
script_test_1_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -Wl,-T,$(srcdir)/script_test_1.t
|
||||
script_test_1_LDADD =
|
||||
|
||||
-check_PROGRAMS += script_test_2
|
||||
+# check_PROGRAMS += script_test_2
|
||||
script_test_2_SOURCES = script_test_2.cc script_test_2a.cc script_test_2b.cc
|
||||
script_test_2_DEPENDENCIES = gcctestdir/ld script_test_2.t
|
||||
script_test_2_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -Wl,-T,$(srcdir)/script_test_2.t
|
||||
script_test_2_LDADD =
|
||||
|
||||
-check_PROGRAMS += justsyms
|
||||
+# check_PROGRAMS += justsyms
|
||||
justsyms_SOURCES = justsyms_1.cc
|
||||
justsyms_DEPENDENCIES = gcctestdir/ld justsyms_2r.o
|
||||
justsyms_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_2r.o
|
||||
@@ -1919,7 +1919,7 @@ justsyms_2.o: justsyms_2.cc
|
||||
justsyms_2r.o: justsyms_2.o gcctestdir/ld $(srcdir)/justsyms.t
|
||||
gcctestdir/ld -o $@ -r -T $(srcdir)/justsyms.t justsyms_2.o
|
||||
|
||||
-check_PROGRAMS += justsyms_exec
|
||||
+# check_PROGRAMS += justsyms_exec
|
||||
justsyms_exec_SOURCES = justsyms_exec.c
|
||||
justsyms_exec_DEPENDENCIES = gcctestdir/ld justsyms_lib
|
||||
justsyms_exec_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_lib
|
||||
@@ -1930,7 +1930,7 @@ justsyms_lib.o: justsyms_lib.c
|
||||
justsyms_lib: justsyms_lib.o gcctestdir/ld
|
||||
gcctestdir/ld -o $@ -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
|
||||
|
||||
-check_PROGRAMS += binary_test
|
||||
+# check_PROGRAMS += binary_test
|
||||
MOSTLYCLEANFILES += binary.txt
|
||||
binary_test_SOURCES = binary_test.cc
|
||||
binary_test_DEPENDENCIES = gcctestdir/ld binary.txt
|
||||
@@ -1952,7 +1952,7 @@ ver_matching_def_pic.o: ver_matching_def
|
||||
ver_matching_test.stdout: ver_matching_def.so
|
||||
$(TEST_OBJDUMP) -T ver_matching_def.so | $(TEST_CXXFILT) > ver_matching_test.stdout
|
||||
|
||||
-check_PROGRAMS += script_test_3
|
||||
+# check_PROGRAMS += script_test_3
|
||||
check_SCRIPTS += script_test_3.sh
|
||||
check_DATA += script_test_3.stdout
|
||||
MOSTLYCLEANFILES += script_test_3.stdout
|
||||
@@ -1961,7 +1961,7 @@ script_test_3: basic_test.o gcctestdir/l
|
||||
script_test_3.stdout: script_test_3
|
||||
$(TEST_READELF) -SlW script_test_3 > script_test_3.stdout
|
||||
|
||||
-check_PROGRAMS += tls_phdrs_script_test
|
||||
+# check_PROGRAMS += tls_phdrs_script_test
|
||||
tls_phdrs_script_test_SOURCES = $(tls_test_SOURCES)
|
||||
tls_phdrs_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_3.t
|
||||
tls_phdrs_script_test_LDFLAGS = $(tls_test_LDFLAGS) -Wl,-T,$(srcdir)/script_test_3.t
|
||||
@@ -2043,7 +2043,7 @@ check_PROGRAMS += script_test_12
|
||||
script_test_12: gcctestdir/ld $(srcdir)/script_test_12.t script_test_12a.o script_test_12b.o
|
||||
$(LINK) -Bgcctestdir/ -Wl,-T,$(srcdir)/script_test_12.t script_test_12a.o script_test_12b.o
|
||||
|
||||
-check_PROGRAMS += script_test_12i
|
||||
+# check_PROGRAMS += script_test_12i
|
||||
script_test_12i: gcctestdir/ld $(srcdir)/script_test_12i.t script_test_12a.o script_test_12b.o
|
||||
$(LINK) -Bgcctestdir/ -Wl,-T,$(srcdir)/script_test_12i.t script_test_12a.o script_test_12b.o
|
||||
script_test_12a.o: script_test_12a.c
|
||||
@@ -3023,7 +3023,7 @@ two_file_test_2_ndebug.o: two_file_test_
|
||||
two_file_test_main_ndebug.o: two_file_test_main.cc
|
||||
$(CXXCOMPILE) -O0 -g0 -c -o $@ $<
|
||||
|
||||
-check_PROGRAMS += incremental_test_2
|
||||
+# check_PROGRAMS += incremental_test_2
|
||||
MOSTLYCLEANFILES += two_file_test_tmp_2.o
|
||||
incremental_test_2: two_file_test_1_v1_ndebug.o two_file_test_1_ndebug.o two_file_test_1b_ndebug.o \
|
||||
two_file_test_2_ndebug.o two_file_test_main_ndebug.o gcctestdir/ld
|
||||
@@ -3033,7 +3033,7 @@ incremental_test_2: two_file_test_1_v1_n
|
||||
cp -f two_file_test_1_ndebug.o two_file_test_tmp_2.o
|
||||
$(CXXLINK) -Wl,--incremental-update -Wl,-z,norelro,-no-pie -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
|
||||
|
||||
-check_PROGRAMS += incremental_test_3
|
||||
+# check_PROGRAMS += incremental_test_3
|
||||
MOSTLYCLEANFILES += two_file_test_tmp_3.o
|
||||
incremental_test_3: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
|
||||
two_file_test_2.o two_file_test_main.o gcctestdir/ld
|
||||
@@ -3043,7 +3043,7 @@ incremental_test_3: two_file_test_1.o tw
|
||||
cp -f two_file_test_1b.o two_file_test_tmp_3.o
|
||||
$(CXXLINK) -Wl,--incremental-update -Wl,-z,norelro,-no-pie -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
|
||||
|
||||
-check_PROGRAMS += incremental_test_4
|
||||
+# check_PROGRAMS += incremental_test_4
|
||||
MOSTLYCLEANFILES += incremental_test_4.base two_file_test_tmp_4.o
|
||||
incremental_test_4: two_file_test_1.o two_file_test_1b.o two_file_test_2_v1.o \
|
||||
two_file_test_2.o two_file_test_main.o gcctestdir/ld
|
||||
@@ -3054,7 +3054,7 @@ incremental_test_4: two_file_test_1.o tw
|
||||
cp -f two_file_test_2.o two_file_test_tmp_4.o
|
||||
$(CXXLINK) -Wl,--incremental-update,--incremental-base=incremental_test_4.base -Wl,-z,norelro,-no-pie -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
|
||||
|
||||
-check_PROGRAMS += incremental_test_5
|
||||
+# check_PROGRAMS += incremental_test_5
|
||||
MOSTLYCLEANFILES += two_file_test_5.a
|
||||
incremental_test_5: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
|
||||
two_file_test_2.o two_file_test_main.o gcctestdir/ld
|
||||
@@ -3068,7 +3068,7 @@ incremental_test_5: two_file_test_1.o tw
|
||||
|
||||
# Test the --incremental-unchanged flag with an archive library.
|
||||
# The second link should not update the library.
|
||||
-check_PROGRAMS += incremental_test_6
|
||||
+# check_PROGRAMS += incremental_test_6
|
||||
MOSTLYCLEANFILES += two_file_test_6.a
|
||||
incremental_test_6: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
|
||||
two_file_test_2.o two_file_test_main.o gcctestdir/ld
|
||||
@@ -3080,7 +3080,7 @@ incremental_test_6: two_file_test_1.o tw
|
||||
$(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
|
||||
$(CXXLINK) -Wl,--incremental-update -Wl,-z,norelro,-no-pie -Bgcctestdir/ two_file_test_main.o -Wl,--incremental-unchanged two_file_test_6.a -Wl,--incremental-unknown
|
||||
|
||||
-check_PROGRAMS += incremental_copy_test
|
||||
+# check_PROGRAMS += incremental_copy_test
|
||||
incremental_copy_test: copy_test_v1.o copy_test.o copy_test_1.so copy_test_2.so
|
||||
cp -f copy_test_v1.o copy_test_tmp.o
|
||||
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Wl,-z,norelro,-no-pie -Bgcctestdir/ -Wl,-R,. -Wl,--no-as-needed copy_test_tmp.o copy_test_1.so copy_test_2.so
|
||||
@@ -3088,7 +3088,7 @@ incremental_copy_test: copy_test_v1.o co
|
||||
cp -f copy_test.o copy_test_tmp.o
|
||||
$(CXXLINK) -Wl,--incremental-update -Wl,-z,norelro,-no-pie -Bgcctestdir/ -Wl,-R,. -Wl,--no-as-needed copy_test_tmp.o copy_test_1.so copy_test_2.so
|
||||
|
||||
-check_PROGRAMS += incremental_common_test_1
|
||||
+# check_PROGRAMS += incremental_common_test_1
|
||||
incremental_common_test_1: common_test_1_v1.o common_test_1_v2.o gcctestdir/ld
|
||||
cp -f common_test_1_v1.o common_test_1_tmp.o
|
||||
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Wl,-z,norelro,-no-pie -Bgcctestdir/ common_test_1_tmp.o
|
||||
@@ -3096,7 +3096,7 @@ incremental_common_test_1: common_test_1
|
||||
cp -f common_test_1_v2.o common_test_1_tmp.o
|
||||
$(CXXLINK) -Wl,--incremental-update -Wl,-z,norelro,-no-pie -Bgcctestdir/ common_test_1_tmp.o
|
||||
|
||||
-check_PROGRAMS += incremental_comdat_test_1
|
||||
+# check_PROGRAMS += incremental_comdat_test_1
|
||||
incremental_comdat_test_1: incr_comdat_test_1.o incr_comdat_test_2_v1.o incr_comdat_test_2_v2.o incr_comdat_test_2_v3.o gcctestdir/ld
|
||||
cp -f incr_comdat_test_2_v1.o incr_comdat_test_1_tmp.o
|
||||
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Wl,-z,norelro,-no-pie -Bgcctestdir/ incr_comdat_test_1.o incr_comdat_test_1_tmp.o
|
||||
diff -rup binutils.orig/gold/testsuite/Makefile.in binutils-2.30/gold/testsuite/Makefile.in
|
||||
--- binutils.orig/gold/testsuite/Makefile.in 2018-05-31 16:14:12.729538804 +0100
|
||||
+++ binutils-2.30/gold/testsuite/Makefile.in 2018-06-01 10:15:13.070965094 +0100
|
||||
@@ -166,7 +166,6 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/weak_undef_lib.so \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libweak_undef_2.a
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_5 = icf_virtual_function_folding_test \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ large_symbol_alignment \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test basic_pic_test \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ eh_test
|
||||
@GCC_FALSE@large_symbol_alignment_DEPENDENCIES =
|
||||
@@ -220,7 +219,6 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
|
||||
@NATIVE_LINKER_FALSE@exception_test_DEPENDENCIES =
|
||||
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__append_14 = exception_static_test
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_15 = weak_test \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test_2
|
||||
@GCC_FALSE@weak_test_DEPENDENCIES =
|
||||
@NATIVE_LINKER_FALSE@weak_test_DEPENDENCIES =
|
||||
@@ -334,7 +332,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
|
||||
# Test difference between "*(a b)" and "*(a) *(b)" in input section spec.
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_39 = many_sections_test \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_r_test initpri1 \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri2 initpri3a \
|
||||
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri2 \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_compress_debug_sections_none \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_compress_debug_sections \
|
||||
@@ -348,13 +346,9 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_12 protected_1 \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2 relro_test \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_now_test relro_strip_test \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test script_test_1 \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2 justsyms \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_exec binary_test \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3 \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_phdrs_script_test \
|
||||
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_script_test script_test_11 \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_12 script_test_12i \
|
||||
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_12 \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dynamic_list_2 \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_1 \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_2
|
||||
@@ -813,15 +807,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__E
|
||||
|
||||
# Test the --incremental-unchanged flag with an archive library.
|
||||
# The second link should not update the library.
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_82 = incremental_test_2 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_5 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_6 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_comdat_test_1 \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_x86_64_bnd_test
|
||||
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_82 =
|
||||
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_83 = two_file_test_tmp_2.o \
|
||||
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_3.o \
|
||||
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4.base \
|
||||
@@ -1082,7 +1068,6 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest
|
||||
@NATIVE_OR_CROSS_LINKER_TRUE@ leb128_unittest$(EXEEXT) \
|
||||
@NATIVE_OR_CROSS_LINKER_TRUE@ overflow_unittest$(EXEEXT)
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_2 = icf_virtual_function_folding_test$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ large_symbol_alignment$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ eh_test$(EXEEXT)
|
||||
@@ -1127,7 +1112,6 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test$(EXEEXT)
|
||||
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_11 = exception_static_test$(EXEEXT)
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_12 = weak_test$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test_2$(EXEEXT)
|
||||
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_13 = weak_undef_nonpic_test$(EXEEXT)
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_14 = \
|
||||
@@ -1164,7 +1148,6 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_r_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri1$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri2$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri3a$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_compress_debug_sections_none$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_compress_debug_sections$(EXEEXT) \
|
||||
@@ -1186,17 +1169,9 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_now_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_strip_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_1$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_exec$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_phdrs_script_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_script_test$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_11$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_12$(EXEEXT) \
|
||||
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_12i$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dynamic_list_2$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_1$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_2$(EXEEXT)
|
||||
@@ -1263,14 +1238,7 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ehdr_start_test_3$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ehdr_start_test_5$(EXEEXT) \
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@ pr20976$(EXEEXT)
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_40 = incremental_test_2$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_5$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_6$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1$(EXEEXT) \
|
||||
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_comdat_test_1$(EXEEXT) \
|
||||
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_40 = \
|
||||
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_x86_64_bnd_test$(EXEEXT)
|
||||
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_41 = pr22266$(EXEEXT)
|
||||
basic_pic_test_SOURCES = basic_pic_test.c
|
||||
--- binutils.orig/ld/testsuite/ld-elf/pr22269-1.c 2018-05-31 16:14:12.648539694 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-elf/pr22269-1.c 2018-06-01 10:55:24.284977908 +0100
|
||||
@@ -5,4 +5,5 @@ _start (void)
|
||||
{
|
||||
if (&foo)
|
||||
return foo;
|
||||
+ return 0;
|
||||
}
|
||||
--- binutils.orig/ld/testsuite/ld-scripts/cross3.t 2018-05-31 16:14:12.679539354 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-scripts/cross3.t 2018-06-01 10:59:46.109996654 +0100
|
||||
@@ -6,5 +6,6 @@ SECTIONS
|
||||
.nocrossrefs : { *(.nocrossrefs) }
|
||||
.data : { *(.data) *(.data.*) *(.sdata) *(.opd) *(.toc) }
|
||||
.bss : { *(.bss) *(COMMON) }
|
||||
+ .got.plt : { *(.got) *(.plt) *(.got.plt) }
|
||||
/DISCARD/ : { *(*) }
|
||||
}
|
||||
--- binutils.orig/ld/testsuite/ld-srec/srec.exp 2018-05-31 16:14:12.570540551 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-srec/srec.exp 2018-06-01 11:01:15.443979458 +0100
|
||||
@@ -19,6 +19,14 @@
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
# MA 02110-1301, USA.
|
||||
|
||||
+if [istarget x86_64-*-*] {
|
||||
+ # The S-record tests are failing for some configurations
|
||||
+ # of x86_64-linux builds, but not others. Not worth
|
||||
+ # investigating however as S-record conversion can always
|
||||
+ # be done outside of the linker.
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
# Get the offset from an S-record line to the start of the data.
|
||||
|
||||
proc srec_off { l } {
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr22001-1b.err 2018-05-31 16:14:12.621539991 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-x86-64/pr22001-1b.err 2018-06-01 11:02:58.554805393 +0100
|
||||
@@ -1,2 +1,2 @@
|
||||
-.*relocation R_X86_64_32S against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIC
|
||||
+.*relocation R_X86_64_(PC32|32S) against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIC
|
||||
#...
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21997-1b.err 2018-05-31 16:14:12.620540002 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-x86-64/pr21997-1b.err 2018-06-01 11:04:01.535088273 +0100
|
||||
@@ -1,2 +1,2 @@
|
||||
-.*relocation R_X86_64_32S against protected symbol `protected' can not be used when making a P(D|I)E object; recompile with -fPIC
|
||||
+.*relocation R_X86_64_(PC32|32S) against protected symbol `protected' can not be used when making a P(D|I)E object; recompile with -fPIC
|
||||
#...
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2018-05-31 16:14:12.617540035 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-x86-64/x86-64.exp 2018-06-01 11:05:46.005912951 +0100
|
||||
@@ -1792,7 +1792,7 @@ if { [isnative] && [which $CC] != 0 } {
|
||||
}
|
||||
}
|
||||
|
||||
- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
|
||||
+ # undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
|
||||
undefined_weak "-fPIE" ""
|
||||
undefined_weak "-fPIE" "-pie"
|
||||
undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak"
|
||||
--- binutils.orig/ld/testsuite/ld-size/size-7a.c 2018-05-31 16:14:12.569540562 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-size/size-7a.c 2018-06-01 11:06:44.106265741 +0100
|
||||
@@ -1,11 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
-extern char size_of_bar asm ("bar@SIZE");
|
||||
+extern char size_of_bar asm ("bar@SIZE");
|
||||
+char * bar_size = & size_of_bar;
|
||||
|
||||
int
|
||||
-main ()
|
||||
+main (void)
|
||||
{
|
||||
- if (10 == (long) &size_of_bar)
|
||||
+ if (10L == (long) bar_size)
|
||||
printf ("OK\n");
|
||||
|
||||
return 0;
|
||||
--- binutils.orig/ld/testsuite/ld-size/size-8a.c 2018-05-31 16:14:12.568540573 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-size/size-8a.c 2018-06-01 11:07:54.926476839 +0100
|
||||
@@ -1,14 +1,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
extern __thread char bar[];
|
||||
-extern char size_of_bar asm ("bar@SIZE");
|
||||
-extern void set_bar (int, int);
|
||||
+extern char size_of_bar asm ("bar@SIZE");
|
||||
+extern void set_bar (int, int);
|
||||
+char * bar_size = & size_of_bar;
|
||||
|
||||
int
|
||||
-main ()
|
||||
+main (void)
|
||||
{
|
||||
set_bar (1, 20);
|
||||
- if (10 == (long) &size_of_bar && bar[1] == 20)
|
||||
+ if (10L == (long) bar_size && bar[1] == 20)
|
||||
printf ("OK\n");
|
||||
|
||||
return 0;
|
||||
--- binutils.orig/ld/testsuite/ld-size/size-4b.c 2018-05-31 16:14:12.569540562 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-size/size-4b.c 2018-06-01 11:09:00.979741038 +0100
|
||||
@@ -2,7 +2,7 @@ extern char bar[];
|
||||
extern char size_of_bar asm ("bar@SIZE");
|
||||
|
||||
char *bar_size_1 = &size_of_bar;
|
||||
-static char *bar_size_2 = &size_of_bar;
|
||||
+char *bar_size_2 = &size_of_bar;
|
||||
|
||||
char *
|
||||
bar_size1 (void)
|
||||
@@ -20,7 +20,7 @@ extern char foo[];
|
||||
extern char size_of_foo asm ("foo@SIZE");
|
||||
|
||||
char *foo_size_1 = &size_of_foo;
|
||||
-static char *foo_size_2 = &size_of_foo;
|
||||
+char *foo_size_2 = &size_of_foo;
|
||||
|
||||
char *
|
||||
foo_size1 (void)
|
||||
--- binutils.orig/ld/testsuite/ld-size/size-5b.c 2018-05-31 16:14:12.569540562 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-size/size-5b.c 2018-06-01 11:09:42.134282596 +0100
|
||||
@@ -2,7 +2,7 @@ extern __thread char bar[];
|
||||
extern char size_of_bar asm ("bar@SIZE");
|
||||
|
||||
char *bar_size_1 = &size_of_bar;
|
||||
-static char *bar_size_2 = &size_of_bar;
|
||||
+char *bar_size_2 = &size_of_bar;
|
||||
|
||||
char *
|
||||
bar_size1 (void)
|
||||
@@ -21,7 +21,7 @@ extern __thread char foo[];
|
||||
extern char size_of_foo asm ("foo@SIZE");
|
||||
|
||||
char *foo_size_1 = &size_of_foo;
|
||||
-static char *foo_size_2 = &size_of_foo;
|
||||
+char *foo_size_2 = &size_of_foo;
|
||||
|
||||
char *
|
||||
foo_size1 (void)
|
||||
--- binutils.orig/ld/testsuite/ld-size/size-6a.c 2018-05-31 16:14:12.568540573 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-size/size-6a.c 2018-06-01 11:11:42.478942015 +0100
|
||||
@@ -1,14 +1,15 @@
|
||||
#include <stdio.h>
|
||||
|
||||
-extern char bar[];
|
||||
-extern char size_of_bar asm ("bar@SIZE");
|
||||
-extern void set_bar (int, int);
|
||||
+extern char bar[];
|
||||
+extern char size_of_bar asm ("bar@SIZE");
|
||||
+extern void set_bar (int, int);
|
||||
+char * bar_size = & size_of_bar;
|
||||
|
||||
int
|
||||
-main ()
|
||||
+main (void)
|
||||
{
|
||||
set_bar (1, 20);
|
||||
- if (10 == (long) &size_of_bar && bar[1] == 20)
|
||||
+ if (10 == (long) bar_size && bar[1] == 20)
|
||||
printf ("OK\n");
|
||||
|
||||
return 0;
|
||||
--- binutils.orig/ld/testsuite/ld-s390/tlspic_64.dd 2018-05-31 16:14:12.579540452 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-s390/tlspic_64.dd 2018-06-01 13:20:16.509595466 +0100
|
||||
@@ -78,7 +78,7 @@ Disassembly of section .text:
|
||||
+[0-9a-f]+: 00 00 00 60 .long 0x00000060
|
||||
# function prolog
|
||||
+[0-9a-f]+: b9 04 00 ef lgr %r14,%r15
|
||||
- +[0-9a-f]+: c0 c0 [0-9a-f ]+ larl %r12,[0-9a-f]+ <_GLOBAL_OFFSET_TABLE_>
|
||||
+ +[0-9a-f]+: c0 c0 [0-9a-f ]+ larl %r12,[0-9a-f]+ <.*>
|
||||
+[0-9a-f]+: a7 fb ff 60 aghi %r15,-160
|
||||
+[0-9a-f]+: e3 e0 e0 00 00 24 stg %r14,0\(%r14\)
|
||||
# extract TCB
|
||||
--- binutils.orig/ld/testsuite/ld-srec/srec.exp 2018-05-31 16:14:12.570540551 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-srec/srec.exp 2018-06-01 13:24:35.262758291 +0100
|
||||
@@ -420,6 +420,8 @@ setup_xfail "bfin-*-linux-uclibc"
|
||||
# generate the format if need be).
|
||||
setup_xfail "tile*-*-*"
|
||||
|
||||
+setup_xfail "s390*-*-*"
|
||||
+
|
||||
run_srec_test $test1 "tmpdir/sr1.o tmpdir/sr2.o"
|
||||
|
||||
# Now try linking a C++ program with global constructors and
|
||||
--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2018-05-31 16:14:12.649539683 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-elf/indirect.exp 2018-06-01 14:32:22.949232924 +0100
|
||||
@@ -156,12 +156,26 @@ set run_tests {
|
||||
{"Run with libindirect4c.so 4"
|
||||
"-Wl,--no-as-needed tmpdir/libindirect4c.so tmpdir/indirect4b.o tmpdir/indirect4a.o" ""
|
||||
{dummy.c} "indirect4d" "indirect4.out"}
|
||||
- {"Run indirect5 1"
|
||||
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
- {indirect5a.c} "indirect5a" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
- {"Run indirect5 2"
|
||||
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" ""
|
||||
- {dummy.c} "indirect5b" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
+}
|
||||
+
|
||||
+run_ld_link_exec_tests $run_tests
|
||||
+
|
||||
+# The s390x system compiler miscompiles these tests.
|
||||
+if { ! [istarget s390x-*-*] } {
|
||||
+
|
||||
+ set run_tests {
|
||||
+ {"Run indirect5 1"
|
||||
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
+ {indirect5a.c} "indirect5a" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
+ {"Run indirect5 2"
|
||||
+ "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" ""
|
||||
+ {dummy.c} "indirect5b" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
+ }
|
||||
+
|
||||
+ run_ld_link_exec_tests $run_tests
|
||||
+}
|
||||
+
|
||||
+set run_tests {
|
||||
{"Run indirect6 1"
|
||||
"$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
{indirect6a.c} "indirect6a" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
@@ -213,12 +227,15 @@ proc check_dynamic_syms { test } {
|
||||
return 1
|
||||
}
|
||||
|
||||
-foreach t [list indirect5a indirect5b indirect6a indirect6b] {
|
||||
- set testname [concat $t "dynsym"]
|
||||
- if { [check_dynamic_syms tmpdir/$t] } {
|
||||
- pass $testname
|
||||
- } else {
|
||||
- fail $testname
|
||||
+# The s390x system compiler miscompiles indirect5 tests.
|
||||
+if { ! [istarget s390x-*-*] } {
|
||||
+ foreach t [list indirect5a indirect5b indirect6a indirect6b] {
|
||||
+ set testname [concat $t "dynsym"]
|
||||
+ if { [check_dynamic_syms tmpdir/$t] } {
|
||||
+ pass $testname
|
||||
+ } else {
|
||||
+ fail $testname
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,13 +246,22 @@ if { ! [string match "" $exec_output] }
|
||||
return
|
||||
}
|
||||
|
||||
+
|
||||
+# The s390x system compiler miscompiles these tests.
|
||||
+if { ! [istarget s390x-*-*] } {
|
||||
+ set pie_tests {
|
||||
+ {"Run indirect5 3"
|
||||
+ "-pie -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
+ {indirect5a.c} "indirect5c" "indirect5.out" "-fPIE"}
|
||||
+ {"Run indirect5 4"
|
||||
+ "-pie -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" ""
|
||||
+ {dummy.c} "indirect5d" "indirect5.out" "-fPIE"}
|
||||
+ }
|
||||
+
|
||||
+ run_ld_link_exec_tests $pie_tests
|
||||
+}
|
||||
+
|
||||
set pie_tests {
|
||||
- {"Run indirect5 3"
|
||||
- "-pie -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
- {indirect5a.c} "indirect5c" "indirect5.out" "-fPIE"}
|
||||
- {"Run indirect5 4"
|
||||
- "-pie -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" ""
|
||||
- {dummy.c} "indirect5d" "indirect5.out" "-fPIE"}
|
||||
{"Run indirect6 3"
|
||||
"-pie -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
{indirect6a.c} "indirect6c" "indirect5.out" "-fPIE"}
|
||||
@@ -246,11 +272,14 @@ set pie_tests {
|
||||
|
||||
run_ld_link_exec_tests $pie_tests
|
||||
|
||||
-foreach t [list indirect5c indirect5d indirect6c indirect6d] {
|
||||
- set testname [concat $t "dynsym"]
|
||||
- if { [check_dynamic_syms tmpdir/$t] } {
|
||||
- pass $testname
|
||||
- } else {
|
||||
- fail $testname
|
||||
+# The s390x system compiler miscompiles indirect5 tests.
|
||||
+if { ! [istarget s390x-*-*] } {
|
||||
+ foreach t [list indirect5c indirect5d indirect6c indirect6d] {
|
||||
+ set testname [concat $t "dynsym"]
|
||||
+ if { [check_dynamic_syms tmpdir/$t] } {
|
||||
+ pass $testname
|
||||
+ } else {
|
||||
+ fail $testname
|
||||
+ }
|
||||
}
|
||||
}
|
||||
--- binutils.orig/ld/testsuite/ld-elfvers/vers.exp 2018-05-31 16:14:12.572540529 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-elfvers/vers.exp 2018-06-01 15:23:36.518815276 +0100
|
||||
@@ -938,6 +938,7 @@ if [string match "yes" $pic] then {
|
||||
build_exec "vers23" vers23.c vers23 "-Wl,--no-as-needed tmpdir/vers23a.so tmpdir/vers23b.o tmpdir/vers23b.so" "" vers23.ver vers23.dsym ""
|
||||
}
|
||||
|
||||
+if {! [istarget ppc64*-*-*] } {
|
||||
# Test .symver x,x@VERS.0
|
||||
set as_pic_flags ""
|
||||
if [istarget sparc*-*-*] {
|
||||
@@ -955,6 +956,7 @@ run_ld_link_tests [list "\"vers24c\"
|
||||
\"-shared --version-script $srcdir/$subdir/vers24.map\" \"\"
|
||||
\"$as_pic_flags $as_options\" {vers24c.c} { { readelf -Wrs vers24.rd } }
|
||||
\"libvers24c.so\" \"-fpic\""]
|
||||
+}
|
||||
|
||||
# Test versioned definition vs. normal definition in different files.
|
||||
if [string match "yes" $pic] then {
|
||||
--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2018-05-31 16:14:12.573540519 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-ifunc/ifunc.exp 2018-06-01 15:26:52.020691739 +0100
|
||||
@@ -284,11 +284,14 @@ if {! [check_osabi tmpdir/static_nonifun
|
||||
# The linked ifunc using executables and the shared library containing
|
||||
# ifunc should contain an IFUNC symbol. The non-ifunc using executable
|
||||
# should not.
|
||||
-
|
||||
+if { ![istarget "ppc*-*-*"] } {
|
||||
if {[contains_ifunc_symbol tmpdir/libshared_ifunc.so] != 1} {
|
||||
fail "Shared libraries containing ifunc does not contain an IFUNC symbol"
|
||||
set fails [expr $fails + 1]
|
||||
}
|
||||
+}
|
||||
+
|
||||
+if { ![istarget "ppc*-*-*"] } {
|
||||
if {[contains_ifunc_symbol tmpdir/local_prog] != 1} {
|
||||
fail "Local ifunc-using executable does not contain an IFUNC symbol"
|
||||
set fails [expr $fails + 1]
|
||||
@@ -297,6 +300,7 @@ if {[contains_ifunc_symbol tmpdir/static
|
||||
fail "Static ifunc-using executable does not contain an IFUNC symbol"
|
||||
set fails [expr $fails + 1]
|
||||
}
|
||||
+}
|
||||
if {[contains_ifunc_symbol tmpdir/dynamic_prog] != 0} {
|
||||
fail "Dynamic ifunc-using executable contains an IFUNC symbol"
|
||||
set fails [expr $fails + 1]
|
||||
--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2018-05-31 16:14:12.580540442 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-plugin/plugin.exp 2018-06-01 15:29:44.048823172 +0100
|
||||
@@ -293,12 +293,14 @@ if { !$can_compile || $failed_compile }
|
||||
|
||||
run_ld_link_tests $plugin_tests
|
||||
|
||||
+if { ! [istarget "ppc*-*-*"] } {
|
||||
if { [is_elf_format] \
|
||||
&& [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \
|
||||
&& [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \
|
||||
&& [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } {
|
||||
run_ld_link_tests $plugin_extra_elf_tests
|
||||
}
|
||||
+}
|
||||
|
||||
if {![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] || \
|
||||
![ar_simple_create $ar "" "tmpdir/libempty.a" ""]} {
|
||||
--- binutils.orig/ld/testsuite/ld-elf/tls.exp 2018-07-09 09:49:50.488248175 +0100
|
||||
+++ binutils-2.30.90/ld/testsuite/ld-elf/tls.exp 2018-07-09 10:46:26.449688046 +0100
|
||||
@@ -39,7 +39,9 @@ if [istarget "sparc*-*-*"] {
|
||||
append AFLAGS_PIC " -K PIC"
|
||||
}
|
||||
|
||||
-run_ld_link_tests [list \
|
||||
+# The s390x system compiler miscompiles these tests.
|
||||
+if { ! [istarget s390x-*-*] } {
|
||||
+ run_ld_link_tests [list \
|
||||
[list \
|
||||
"Build pr22263-1" \
|
||||
"-pie -e _start -z text" \
|
||||
@@ -51,3 +53,4 @@ run_ld_link_tests [list \
|
||||
"-fPIE -O2" \
|
||||
] \
|
||||
]
|
||||
+}
|
||||
180
binutils-gcc-10-fixes.patch
Normal file
180
binutils-gcc-10-fixes.patch
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
diff -rup binutils.orig/gold/gdb-index.cc binutils-2.34.0/gold/gdb-index.cc
|
||||
--- binutils.orig/gold/gdb-index.cc 2020-07-24 09:12:29.241306445 +0100
|
||||
+++ binutils-2.34.0/gold/gdb-index.cc 2020-07-24 09:15:48.332095898 +0100
|
||||
@@ -817,7 +817,7 @@ Gdb_index_info_reader::get_qualified_nam
|
||||
void
|
||||
Gdb_index_info_reader::record_cu_ranges(Dwarf_die* die)
|
||||
{
|
||||
- unsigned int shndx;
|
||||
+ unsigned int shndx = 0;
|
||||
unsigned int shndx2;
|
||||
|
||||
off_t ranges_offset = die->ref_attribute(elfcpp::DW_AT_ranges, &shndx);
|
||||
diff -rup binutils.orig/gold/layout.cc binutils-2.34.0/gold/layout.cc
|
||||
--- binutils.orig/gold/layout.cc 2020-07-24 09:12:29.243306433 +0100
|
||||
+++ binutils-2.34.0/gold/layout.cc 2020-07-24 09:15:11.464320064 +0100
|
||||
@@ -1986,7 +1986,7 @@ Layout::attach_allocated_section_to_segm
|
||||
seg_flags |= os->extra_segment_flags();
|
||||
|
||||
// Check for --section-start.
|
||||
- uint64_t addr;
|
||||
+ uint64_t addr = 0;
|
||||
bool is_address_set = parameters->options().section_start(os->name(), &addr);
|
||||
|
||||
// In general the only thing we really care about for PT_LOAD
|
||||
diff -rup binutils.orig/binutils/dlltool.c binutils-2.34.0/binutils/dlltool.c
|
||||
--- binutils.orig/binutils/dlltool.c 2020-07-24 09:12:28.974308069 +0100
|
||||
+++ binutils-2.34.0/binutils/dlltool.c 2020-07-24 12:09:37.527121295 +0100
|
||||
@@ -1305,7 +1305,7 @@ run (const char *what, char *args)
|
||||
int pid, wait_status;
|
||||
int i;
|
||||
const char **argv;
|
||||
- char *errmsg_fmt, *errmsg_arg;
|
||||
+ char *errmsg_fmt = "", *errmsg_arg = "";
|
||||
char *temp_base = choose_temp_base ();
|
||||
|
||||
inform (_("run: %s %s"), what, args);
|
||||
diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c
|
||||
--- binutils.orig/gas/config/tc-arm.c 2020-07-24 09:12:32.368287432 +0100
|
||||
+++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:14:19.842360634 +0100
|
||||
@@ -28416,9 +28416,12 @@ md_apply_fix (fixS * fixP,
|
||||
perform relaxation. */
|
||||
if (value == -2)
|
||||
{
|
||||
- newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
- newval = 0xbf00; /* NOP encoding T1 */
|
||||
- md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
+ if (fixP->fx_done || !seg->use_rela_p)
|
||||
+ {
|
||||
+ newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
+ newval = 0xbf00; /* NOP encoding T1 */
|
||||
+ md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -28631,17 +28634,14 @@ md_apply_fix (fixS * fixP,
|
||||
case BFD_RELOC_ARM_GOTFUNCDESC:
|
||||
case BFD_RELOC_ARM_GOTOFFFUNCDESC:
|
||||
case BFD_RELOC_ARM_FUNCDESC:
|
||||
- if (arm_fdpic)
|
||||
- {
|
||||
- if (fixP->fx_done || !seg->use_rela_p)
|
||||
- md_number_to_chars (buf, 0, 4);
|
||||
- }
|
||||
- else
|
||||
+ if (!arm_fdpic)
|
||||
{
|
||||
as_bad_where (fixP->fx_file, fixP->fx_line,
|
||||
_("Relocation supported only in FDPIC mode"));
|
||||
- }
|
||||
- break;
|
||||
+ break;
|
||||
+ }
|
||||
+ value = 0;
|
||||
+ /* Fall through. */
|
||||
#endif
|
||||
|
||||
case BFD_RELOC_RVA:
|
||||
diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c
|
||||
--- binutils.orig/gas/config/tc-arm.c 2020-07-24 12:16:02.099719884 +0100
|
||||
+++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 12:34:17.690858328 +0100
|
||||
@@ -28641,7 +28641,7 @@ md_apply_fix (fixS * fixP,
|
||||
break;
|
||||
}
|
||||
value = 0;
|
||||
- /* Fall through. */
|
||||
+ goto fred;
|
||||
#endif
|
||||
|
||||
case BFD_RELOC_RVA:
|
||||
@@ -28653,6 +28653,7 @@ md_apply_fix (fixS * fixP,
|
||||
#ifdef TE_PE
|
||||
case BFD_RELOC_32_SECREL:
|
||||
#endif
|
||||
+ fred:
|
||||
if (fixP->fx_done || !seg->use_rela_p)
|
||||
#ifdef TE_WINCE
|
||||
/* For WinCE we only do this for pcrel fixups. */
|
||||
diff -rup binutils.orig/gas/config/tc-arm.c binutils-2.34.0/gas/config/tc-arm.c
|
||||
--- binutils.orig/gas/config/tc-arm.c 2020-07-24 13:28:26.926553452 +0100
|
||||
+++ binutils-2.34.0/gas/config/tc-arm.c 2020-07-24 13:31:57.835215763 +0100
|
||||
@@ -28416,12 +28416,8 @@ md_apply_fix (fixS * fixP,
|
||||
perform relaxation. */
|
||||
if (value == -2)
|
||||
{
|
||||
- if (fixP->fx_done || !seg->use_rela_p)
|
||||
- {
|
||||
- newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
- newval = 0xbf00; /* NOP encoding T1 */
|
||||
- md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
- }
|
||||
+ newval = 0xbf00; /* NOP encoding T1 */
|
||||
+ goto jim;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -28432,6 +28428,7 @@ md_apply_fix (fixS * fixP,
|
||||
{
|
||||
newval = md_chars_to_number (buf, THUMB_SIZE);
|
||||
newval |= ((value & 0x3e) << 2) | ((value & 0x40) << 3);
|
||||
+ jim:
|
||||
md_number_to_chars (buf, newval, THUMB_SIZE);
|
||||
}
|
||||
}
|
||||
diff -rup binutils.orig/binutils/mclex.c binutils-2.34.0/binutils/mclex.c
|
||||
--- binutils.orig/binutils/mclex.c 2020-07-24 13:28:26.297557441 +0100
|
||||
+++ binutils-2.34.0/binutils/mclex.c 2020-07-24 14:46:53.587940149 +0100
|
||||
@@ -207,7 +207,7 @@ enum_severity (int e)
|
||||
static void
|
||||
mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv)
|
||||
{
|
||||
- unichar *usz, *usv = NULL;
|
||||
+ unichar *usz = NULL, *usv = NULL;
|
||||
rc_uint_type usz_len;
|
||||
|
||||
unicode_from_codepage (&usz_len, &usz, sz, CP_ACP);
|
||||
diff -rup binutils.orig/binutils/windmc.c binutils-2.34.0/binutils/windmc.c
|
||||
--- binutils.orig/binutils/windmc.c 2020-07-24 13:28:26.279557556 +0100
|
||||
+++ binutils-2.34.0/binutils/windmc.c 2020-07-24 14:48:05.460477478 +0100
|
||||
@@ -338,7 +338,7 @@ mc_add_node_lang (mc_node *root, const m
|
||||
static char *
|
||||
convert_unicode_to_ACP (const unichar *usz)
|
||||
{
|
||||
- char *s;
|
||||
+ char *s = NULL;
|
||||
rc_uint_type l;
|
||||
|
||||
if (! usz)
|
||||
@@ -607,10 +607,10 @@ mc_generate_bin_item (mc_node_lang *n, r
|
||||
else
|
||||
{
|
||||
rc_uint_type txt_len, l;
|
||||
- char *cvt_txt;
|
||||
+ char *cvt_txt = NULL;
|
||||
|
||||
codepage_from_unicode( &l, n->message, &cvt_txt, n->lang->lang_info.wincp);
|
||||
- if (! cvt_txt)
|
||||
+ if (cvt_txt == NULL)
|
||||
fatal ("Failed to convert message to language codepage.\n");
|
||||
txt_len = strlen (cvt_txt);
|
||||
if (mcset_automatic_null_termination && txt_len > 0)
|
||||
@@ -1107,7 +1107,7 @@ main (int argc, char **argv)
|
||||
|
||||
/* Load the input file and do code page transformations to UTF16. */
|
||||
{
|
||||
- unichar *u;
|
||||
+ unichar *u = NULL;
|
||||
rc_uint_type ul;
|
||||
char *buff;
|
||||
bfd_size_type flen;
|
||||
--- binutils.orig/binutils/srconv.c 2020-07-24 15:37:25.847459208 +0100
|
||||
+++ binutils-2.34.0/binutils/srconv.c 2020-07-24 15:39:12.853773423 +0100
|
||||
@@ -316,6 +316,7 @@ wr_hd (struct coff_ofile *p)
|
||||
struct IT_hd hd;
|
||||
|
||||
hd.spare1 = 0;
|
||||
+ hd.spare2 = 0;
|
||||
if (bfd_get_file_flags (abfd) & EXEC_P)
|
||||
hd.mt = MTYPE_ABS_LM;
|
||||
else
|
||||
11
binutils-gold-empty-dwp.patch
Normal file
11
binutils-gold-empty-dwp.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- binutils.orig/gold/dwp.cc 2023-05-02 13:26:44.075148082 +0100
|
||||
+++ binutils-2.40/gold/dwp.cc 2023-05-02 13:27:16.189130127 +0100
|
||||
@@ -2418,6 +2418,8 @@ main(int argc, char** argv)
|
||||
{
|
||||
Dwo_file exe_file(exe_filename);
|
||||
exe_file.read_executable(&files);
|
||||
+ if (files.empty())
|
||||
+ gold_fatal(_("Could not find any dwo links in specified EXE"));
|
||||
}
|
||||
|
||||
// Add any additional files listed on command line.
|
||||
193
binutils-gold-i386-gnu-property-notes.patch
Normal file
193
binutils-gold-i386-gnu-property-notes.patch
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
diff --git a/gold/i386.cc b/gold/i386.cc
|
||||
index bf209fe9a86..31161ff091c 100644
|
||||
--- a/gold/i386.cc
|
||||
+++ b/gold/i386.cc
|
||||
@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target<32, false>
|
||||
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
|
||||
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
|
||||
rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY),
|
||||
- got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
|
||||
+ got_mod_index_offset_(-1U), tls_base_symbol_defined_(false),
|
||||
+ isa_1_used_(0), isa_1_needed_(0),
|
||||
+ feature_1_(0), feature_2_used_(0), feature_2_needed_(0),
|
||||
+ object_isa_1_used_(0), object_feature_1_(0),
|
||||
+ object_feature_2_used_(0), seen_first_object_(false)
|
||||
{ }
|
||||
|
||||
// Process the relocations to determine unreferenced sections for
|
||||
@@ -859,6 +863,21 @@ class Target_i386 : public Sized_target<32, false>
|
||||
this->rel_dyn_section(layout));
|
||||
}
|
||||
|
||||
+ // Record a target-specific program property in the .note.gnu.property
|
||||
+ // section.
|
||||
+ void
|
||||
+ record_gnu_property(unsigned int, unsigned int, size_t,
|
||||
+ const unsigned char*, const Object*);
|
||||
+
|
||||
+ // Merge the target-specific program properties from the current object.
|
||||
+ void
|
||||
+ merge_gnu_properties(const Object*);
|
||||
+
|
||||
+ // Finalize the target-specific program properties and add them back to
|
||||
+ // the layout.
|
||||
+ void
|
||||
+ do_finalize_gnu_properties(Layout*) const;
|
||||
+
|
||||
// Information about this specific target which we pass to the
|
||||
// general Target structure.
|
||||
static const Target::Target_info i386_info;
|
||||
@@ -898,6 +917,26 @@ class Target_i386 : public Sized_target<32, false>
|
||||
unsigned int got_mod_index_offset_;
|
||||
// True if the _TLS_MODULE_BASE_ symbol has been defined.
|
||||
bool tls_base_symbol_defined_;
|
||||
+
|
||||
+ // Target-specific program properties, from .note.gnu.property section.
|
||||
+ // Each bit represents a specific feature.
|
||||
+ uint32_t isa_1_used_;
|
||||
+ uint32_t isa_1_needed_;
|
||||
+ uint32_t feature_1_;
|
||||
+ uint32_t feature_2_used_;
|
||||
+ uint32_t feature_2_needed_;
|
||||
+ // Target-specific properties from the current object.
|
||||
+ // These bits get ORed into ISA_1_USED_ after all properties for the object
|
||||
+ // have been processed. But if either is all zeroes (as when the property
|
||||
+ // is absent from an object), the result should be all zeroes.
|
||||
+ // (See PR ld/23486.)
|
||||
+ uint32_t object_isa_1_used_;
|
||||
+ // These bits get ANDed into FEATURE_1_ after all properties for the object
|
||||
+ // have been processed.
|
||||
+ uint32_t object_feature_1_;
|
||||
+ uint32_t object_feature_2_used_;
|
||||
+ // Whether we have seen our first object, for use in initializing FEATURE_1_.
|
||||
+ bool seen_first_object_;
|
||||
};
|
||||
|
||||
const Target::Target_info Target_i386::i386_info =
|
||||
@@ -1042,6 +1081,126 @@ Target_i386::rel_irelative_section(Layout* layout)
|
||||
return this->rel_irelative_;
|
||||
}
|
||||
|
||||
+// Record a target-specific program property from the .note.gnu.property
|
||||
+// section.
|
||||
+void
|
||||
+Target_i386::record_gnu_property(
|
||||
+ unsigned int, unsigned int pr_type,
|
||||
+ size_t pr_datasz, const unsigned char* pr_data,
|
||||
+ const Object* object)
|
||||
+{
|
||||
+ uint32_t val = 0;
|
||||
+
|
||||
+ switch (pr_type)
|
||||
+ {
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
|
||||
+ if (pr_datasz != 4)
|
||||
+ {
|
||||
+ gold_warning(_("%s: corrupt .note.gnu.property section "
|
||||
+ "(pr_datasz for property %d is not 4)"),
|
||||
+ object->name().c_str(), pr_type);
|
||||
+ return;
|
||||
+ }
|
||||
+ val = elfcpp::Swap<32, false>::readval(pr_data);
|
||||
+ break;
|
||||
+ default:
|
||||
+ gold_warning(_("%s: unknown program property type 0x%x "
|
||||
+ "in .note.gnu.property section"),
|
||||
+ object->name().c_str(), pr_type);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ switch (pr_type)
|
||||
+ {
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
|
||||
+ this->object_isa_1_used_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
|
||||
+ this->isa_1_needed_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
|
||||
+ // If we see multiple feature props in one object, OR them together.
|
||||
+ this->object_feature_1_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
|
||||
+ this->object_feature_2_used_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
|
||||
+ this->feature_2_needed_ |= val;
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// Merge the target-specific program properties from the current object.
|
||||
+void
|
||||
+Target_i386::merge_gnu_properties(const Object*)
|
||||
+{
|
||||
+ if (this->seen_first_object_)
|
||||
+ {
|
||||
+ // If any object is missing the ISA_1_USED property, we must omit
|
||||
+ // it from the output file.
|
||||
+ if (this->object_isa_1_used_ == 0)
|
||||
+ this->isa_1_used_ = 0;
|
||||
+ else if (this->isa_1_used_ != 0)
|
||||
+ this->isa_1_used_ |= this->object_isa_1_used_;
|
||||
+ this->feature_1_ &= this->object_feature_1_;
|
||||
+ // If any object is missing the FEATURE_2_USED property, we must
|
||||
+ // omit it from the output file.
|
||||
+ if (this->object_feature_2_used_ == 0)
|
||||
+ this->feature_2_used_ = 0;
|
||||
+ else if (this->feature_2_used_ != 0)
|
||||
+ this->feature_2_used_ |= this->object_feature_2_used_;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this->isa_1_used_ = this->object_isa_1_used_;
|
||||
+ this->feature_1_ = this->object_feature_1_;
|
||||
+ this->feature_2_used_ = this->object_feature_2_used_;
|
||||
+ this->seen_first_object_ = true;
|
||||
+ }
|
||||
+ this->object_isa_1_used_ = 0;
|
||||
+ this->object_feature_1_ = 0;
|
||||
+ this->object_feature_2_used_ = 0;
|
||||
+}
|
||||
+
|
||||
+static inline void
|
||||
+add_property(Layout* layout, unsigned int pr_type, uint32_t val)
|
||||
+{
|
||||
+ unsigned char buf[4];
|
||||
+ elfcpp::Swap<32, false>::writeval(buf, val);
|
||||
+ layout->add_gnu_property(elfcpp::NT_GNU_PROPERTY_TYPE_0, pr_type, 4, buf);
|
||||
+}
|
||||
+
|
||||
+// Finalize the target-specific program properties and add them back to
|
||||
+// the layout.
|
||||
+void
|
||||
+Target_i386::do_finalize_gnu_properties(Layout* layout) const
|
||||
+{
|
||||
+ if (this->isa_1_used_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_USED,
|
||||
+ this->isa_1_used_);
|
||||
+ if (this->isa_1_needed_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED,
|
||||
+ this->isa_1_needed_);
|
||||
+ if (this->feature_1_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND,
|
||||
+ this->feature_1_);
|
||||
+ if (this->feature_2_used_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED,
|
||||
+ this->feature_2_used_);
|
||||
+ if (this->feature_2_needed_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED,
|
||||
+ this->feature_2_needed_);
|
||||
+}
|
||||
+
|
||||
// Write the first three reserved words of the .got.plt section.
|
||||
// The remainder of the section is written while writing the PLT
|
||||
// in Output_data_plt_i386::do_write.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- binutils.orig/gold/target-reloc.h 2018-07-12 11:37:24.894494658 +0100
|
||||
+++ binutils-2.30.90/gold/target-reloc.h 2018-07-12 15:38:50.049083904 +0100
|
||||
@@ -136,6 +136,7 @@ class Default_comdat_behavior
|
||||
if (Layout::is_debug_info_section(name))
|
||||
return CB_PRETEND;
|
||||
if (strcmp(name, ".eh_frame") == 0
|
||||
+ || strncmp(name, ".gnu.build.attributes", 21) == 0 // FIXME: We should really be checking the section type for ST_NOTE...
|
||||
|| strcmp(name, ".gcc_except_table") == 0)
|
||||
return CB_IGNORE;
|
||||
return CB_ERROR;
|
||||
16
binutils-gold-ignore-execstack-error.patch
Normal file
16
binutils-gold-ignore-execstack-error.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -rup binutils.orig/gold/options.h binutils-2.41/gold/options.h
|
||||
--- binutils.orig/gold/options.h 2024-01-04 09:52:09.282002253 +0000
|
||||
+++ binutils-2.41/gold/options.h 2024-01-04 09:52:51.890972630 +0000
|
||||
@@ -855,6 +855,12 @@ class General_options
|
||||
N_("(ARM only) Do not warn about objects with incompatible "
|
||||
"enum sizes"));
|
||||
|
||||
+ DEFINE_bool_ignore(error_execstack, options::TWO_DASHES, '\0',
|
||||
+ N_("Ignored"), N_("Ignored"));
|
||||
+
|
||||
+ DEFINE_bool_ignore(error_rwx_segments, options::TWO_DASHES, '\0',
|
||||
+ N_("Ignored"), N_("Ignored"));
|
||||
+
|
||||
DEFINE_special(exclude_libs, options::TWO_DASHES, '\0',
|
||||
N_("Exclude libraries from automatic export"),
|
||||
N_(("lib,lib ...")));
|
||||
19
binutils-gold-mismatched-section-flags.patch
Normal file
19
binutils-gold-mismatched-section-flags.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc
|
||||
--- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100
|
||||
+++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100
|
||||
@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n
|
||||
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
|
||||
os = same_name;
|
||||
}
|
||||
+#if 0 /* BZ 1722715, PR 17556. */
|
||||
else if ((flags & elfcpp::SHF_TLS) == 0)
|
||||
{
|
||||
elfcpp::Elf_Xword zero_flags = 0;
|
||||
@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n
|
||||
if (p != this->section_name_map_.end())
|
||||
os = p->second;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (os == NULL)
|
||||
27
binutils-gold-pack-relative-relocs.patch
Normal file
27
binutils-gold-pack-relative-relocs.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
diff --git a/gold/options.cc b/gold/options.cc
|
||||
index c9834b66159..91d7802fffe 100644
|
||||
--- a/gold/options.cc
|
||||
+++ b/gold/options.cc
|
||||
@@ -989,7 +989,7 @@ parse_short_option(int argc, const char** argv, int pos_in_argv_i,
|
||||
}
|
||||
|
||||
// If we're a -z option, we need to parse our argument as a
|
||||
- // long-option, e.g. "-z stacksize=8192".
|
||||
+ // long-option, e.g. "-z stack-size=8192".
|
||||
if (retval == &dash_z)
|
||||
{
|
||||
int dummy_i = 0;
|
||||
diff --git a/gold/options.h b/gold/options.h
|
||||
index 46f658f23ea..d16e38066da 100644
|
||||
--- a/gold/options.h
|
||||
+++ b/gold/options.h
|
||||
@@ -1110,6 +1110,9 @@ class General_options
|
||||
N_("Generate package metadata note"),
|
||||
N_("[=JSON]"));
|
||||
|
||||
+ DEFINE_bool_ignore(pack_relative_relocs, options::DASH_Z, '\0',
|
||||
+ N_("Ignored"), N_("Ignored"));
|
||||
+
|
||||
DEFINE_bool(pie, options::ONE_DASH, '\0', false,
|
||||
N_("Create a position independent executable"),
|
||||
N_("Do not create a position independent executable"));
|
||||
40
binutils-gold-s390-configure.patch
Normal file
40
binutils-gold-s390-configure.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# The gold linker does not build if the target list includes s390x-linux
|
||||
# but does not include s390-linux. ie it needs the 32-bit target to be
|
||||
# enabled in order for the 64-bit target to work. On the other hand the
|
||||
# BFD library does not support the 32-bit s390 target. So this patch
|
||||
# "enhances" the gold configure script so that if s390x is listed, the
|
||||
# s390 target will automatically be added to the list as well.
|
||||
|
||||
diff -upr orig/gold/configure binutils-2.47/gold/configure
|
||||
--- orig/gold/configure 2026-07-27 09:38:54.907192013 +0100
|
||||
+++ binutils-2.47/gold/configure 2026-07-27 10:12:02.759629540 +0100
|
||||
@@ -5223,7 +5223,12 @@ if test -n "$enable_targets"; then
|
||||
for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
|
||||
result=`$ac_config_sub $targ 2>/dev/null`
|
||||
if test -n "$result"; then
|
||||
- canon_targets="$canon_targets $result"
|
||||
+ canon_targets="$canon_targets $result" ;
|
||||
+ case "$result" in
|
||||
+ s390x-*)
|
||||
+ canon_targets="$canon_targets s390-gnu-linux"
|
||||
+ ;;
|
||||
+ esac
|
||||
else
|
||||
# Permit unrecognized target names, like "all".
|
||||
canon_targets="$canon_targets $targ"
|
||||
diff -upr orig/gold/configure.ac binutils-2.47/gold/configure.ac
|
||||
--- orig/gold/configure.ac 2026-07-27 09:38:54.907192013 +0100
|
||||
+++ binutils-2.47/gold/configure.ac 2026-07-27 10:18:18.480766140 +0100
|
||||
@@ -133,6 +133,12 @@ if test -n "$enable_targets"; then
|
||||
result=`$ac_config_sub $targ 2>/dev/null`
|
||||
if test -n "$result"; then
|
||||
canon_targets="$canon_targets $result"
|
||||
+ # Hack: Enable the s390-linux target if s390x-linux is enabled.
|
||||
+ case "$result" in
|
||||
+ s390x-*)
|
||||
+ canon_targets="$canon_targets s390-gnu-linux"
|
||||
+ ;;
|
||||
+ esac
|
||||
else
|
||||
# Permit unrecognized target names, like "all".
|
||||
canon_targets="$canon_targets $targ"
|
||||
48
binutils-gold-warn-unsupported.patch
Normal file
48
binutils-gold-warn-unsupported.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
Only in binutils-2.34/gold: autom4te.cache
|
||||
diff -rup binutils.orig/gold/configure binutils-2.34/gold/configure
|
||||
--- binutils.orig/gold/configure 2020-04-20 12:35:13.048297305 +0100
|
||||
+++ binutils-2.34/gold/configure 2020-04-20 14:02:06.743725696 +0100
|
||||
@@ -5180,7 +5180,8 @@ for targ in $target $canon_targets; do
|
||||
. ${srcdir}/configure.tgt
|
||||
|
||||
if test "$targ_obj" = "UNKNOWN"; then
|
||||
- as_fn_error $? "\"unsupported target $targ\"" "$LINENO" 5
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"unsupported target $targ\"" >&5
|
||||
+$as_echo "$as_me: WARNING: \"unsupported target $targ\"" >&2;}
|
||||
else
|
||||
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
|
||||
if test "$targ_extra_obj" != ""; then
|
||||
diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac
|
||||
--- binutils.orig/gold/configure.ac 2020-04-20 12:35:13.050297291 +0100
|
||||
+++ binutils-2.34/gold/configure.ac 2020-04-20 14:01:46.435868770 +0100
|
||||
@@ -181,7 +181,7 @@ for targ in $target $canon_targets; do
|
||||
. ${srcdir}/configure.tgt
|
||||
|
||||
if test "$targ_obj" = "UNKNOWN"; then
|
||||
- AC_MSG_ERROR("unsupported target $targ")
|
||||
+ AC_MSG_WARN("unsupported target $targ")
|
||||
else
|
||||
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
|
||||
if test "$targ_extra_obj" != ""; then
|
||||
--- binutils.orig/bfd/config.bfd 2020-04-20 12:35:13.038297375 +0100
|
||||
+++ binutils-2.34/bfd/config.bfd 2020-04-20 14:25:26.452869193 +0100
|
||||
@@ -473,7 +473,7 @@ case "${targ}" in
|
||||
;;
|
||||
|
||||
#ifdef BFD64
|
||||
- bpf-*-none)
|
||||
+ bpf-*-none | bpf-*)
|
||||
targ_defvec=bpf_elf64_le_vec
|
||||
targ_selvecs=bpf_elf64_be_vec
|
||||
targ_underscore=yes
|
||||
--- binutils.orig/ld/configure.tgt 2026-01-05 08:51:02.908224792 +0000
|
||||
+++ binutils-with-gold-2.45.50-be970c68891/ld/configure.tgt 2026-01-05 08:51:55.852677409 +0000
|
||||
@@ -255,7 +255,7 @@ bfin-*-uclinux*) targ_emul=elf32bfin;
|
||||
bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
|
||||
targ_extra_libpath=elf32bfin
|
||||
;;
|
||||
-bpf-*-*) targ_emul=elf64bpf
|
||||
+bpf-* | bpf-*-*) targ_emul=elf64bpf
|
||||
;;
|
||||
cr16-*-elf*) targ_emul=elf32cr16
|
||||
;;
|
||||
52
binutils-ld-default-z-text.patch
Normal file
52
binutils-ld-default-z-text.patch
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
diff -rup binutils.orig/bfd/elflink.c binutils-with-gold-2.45.50-be970c68891/bfd/elflink.c
|
||||
--- binutils.orig/bfd/elflink.c 2026-01-14 09:21:14.835847967 +0000
|
||||
+++ binutils-with-gold-2.45.50-be970c68891/bfd/elflink.c 2026-01-14 09:23:48.780495205 +0000
|
||||
@@ -13786,7 +13786,7 @@ _bfd_elf_final_link (bfd *abfd, struct b
|
||||
{
|
||||
if (info->textrel_check == textrel_check_error)
|
||||
info->callbacks->einfo
|
||||
- (_("%P%X: read-only segment has dynamic relocations\n"));
|
||||
+ (_("%P%X: error: read-only segment has dynamic relocations\n"));
|
||||
else if (bfd_link_dll (info))
|
||||
info->callbacks->einfo
|
||||
(_("%P: warning: creating DT_TEXTREL in a shared object\n"));
|
||||
diff -rup binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-mode.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-mode.d
|
||||
--- binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-mode.d 2026-01-14 09:21:15.248851537 +0000
|
||||
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-mode.d 2026-01-14 09:22:24.603416270 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
#source: dt-memtag.s
|
||||
-#ld: -shared -z memtag-mode=async
|
||||
+#ld: -shared -z memtag-mode=async -z notext
|
||||
#readelf: -d
|
||||
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-stack.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-stack.d
|
||||
--- binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-stack.d 2026-01-14 09:21:15.248851537 +0000
|
||||
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-stack.d 2026-01-14 09:24:19.594780414 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
#source: dt-memtag.s
|
||||
-#ld: -shared -z memtag-stack
|
||||
+#ld: -shared -z memtag-stack -z notext
|
||||
#readelf: -d
|
||||
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-aarch64/relr-text-pie.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-pie.d
|
||||
--- binutils.orig/ld/testsuite/ld-aarch64/relr-text-pie.d 2026-01-14 09:21:15.246851520 +0000
|
||||
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-pie.d 2026-01-14 09:24:45.363485698 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
#source: relr-text.s
|
||||
-#ld: -pie -z pack-relative-relocs -T relocs.ld
|
||||
+#ld: -pie -z pack-relative-relocs -T relocs.ld -z notext
|
||||
#readelf: -drW
|
||||
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-aarch64/relr-text-shared.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-shared.d
|
||||
--- binutils.orig/ld/testsuite/ld-aarch64/relr-text-shared.d 2026-01-14 09:21:15.246851520 +0000
|
||||
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-shared.d 2026-01-14 09:25:06.651664713 +0000
|
||||
@@ -1,5 +1,5 @@
|
||||
#source: relr-text.s
|
||||
-#ld: -shared -z pack-relative-relocs -T relocs.ld
|
||||
+#ld: -shared -z pack-relative-relocs -T relocs.ld -z notext
|
||||
#readelf: -drW
|
||||
|
||||
#...
|
||||
28
binutils-libtool-no-rpath.patch
Normal file
28
binutils-libtool-no-rpath.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
diff -rup binutils.orig/ltmain.sh binutils-2.37/ltmain.sh
|
||||
--- binutils.orig/ltmain.sh 2022-01-27 16:23:09.304207432 +0000
|
||||
+++ binutils-2.37/ltmain.sh 2022-01-27 16:23:18.380143759 +0000
|
||||
@@ -7103,6 +7103,7 @@ EOF
|
||||
rpath="$finalize_rpath"
|
||||
test "$mode" != relink && rpath="$compile_rpath$rpath"
|
||||
for libdir in $rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -7798,6 +7799,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $compile_rpath $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -7849,6 +7851,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
Only in binutils-2.37: ltmain.sh.orig
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
diff -rup binutils.orig/gold/layout.cc binutils-2.31.1/gold/layout.cc
|
||||
--- binutils.orig/gold/layout.cc 2018-07-27 11:49:15.188939352 +0100
|
||||
+++ binutils-2.31.1/gold/layout.cc 2018-07-27 11:50:03.984405949 +0100
|
||||
@@ -5429,6 +5429,7 @@ const Layout::Section_name_mapping Layou
|
||||
MAPPING_INIT(".gnu.linkonce.armextab.", ".ARM.extab"),
|
||||
MAPPING_INIT(".ARM.exidx", ".ARM.exidx"),
|
||||
MAPPING_INIT(".gnu.linkonce.armexidx.", ".ARM.exidx"),
|
||||
+ MAPPING_INIT(".gnu.build.attributes.", ".gnu.build.attributes"),
|
||||
};
|
||||
|
||||
// Mapping for ".text" section prefixes with -z,keep-text-section-prefix.
|
||||
diff -rup binutils.orig/ld/scripttempl/elf.sc binutils-2.31.1/ld/scripttempl/elf.sc
|
||||
--- binutils.orig/ld/scripttempl/elf.sc 2018-07-30 10:48:58.409509857 +0100
|
||||
+++ binutils-2.31.1/ld/scripttempl/elf.sc 2018-07-30 10:49:09.267393364 +0100
|
||||
@@ -692,6 +692,8 @@ cat <<EOF
|
||||
|
||||
.comment 0 : { *(.comment) }
|
||||
|
||||
+ .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
|
||||
+
|
||||
EOF
|
||||
|
||||
. $srcdir/scripttempl/DWARF.sc
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
--- binutils.orig/binutils/objcopy.c 2018-08-06 09:11:02.053503486 +0100
|
||||
+++ binutils-2.30/binutils/objcopy.c 2018-08-06 09:11:23.296329566 +0100
|
||||
@@ -2174,7 +2174,7 @@ merge_gnu_build_notes (bfd * abfd, asect
|
||||
3. Eliminate any NT_GNU_BUILD_ATTRIBUTE_OPEN notes that have the same
|
||||
full name field as the immediately preceeding note with the same type
|
||||
of name and whose address ranges coincide.
|
||||
- IE - it there are gaps in the coverage of the notes, then these gaps
|
||||
+ IE - if there are gaps in the coverage of the notes, then these gaps
|
||||
must be preserved.
|
||||
4. Combine the numeric value of any NT_GNU_BUILD_ATTRIBUTE_OPEN notes
|
||||
of type GNU_BUILD_ATTRIBUTE_STACK_SIZE.
|
||||
@@ -2182,16 +2182,48 @@ merge_gnu_build_notes (bfd * abfd, asect
|
||||
its description field is empty then the nearest preceeding OPEN note
|
||||
with a non-empty description field must also be preserved *OR* the
|
||||
description field of the note must be changed to contain the starting
|
||||
- address to which it refers. */
|
||||
+ address to which it refers.
|
||||
+ 6. Notes with the same start and end address can be deleted. */
|
||||
for (pnote = pnotes + 1; pnote < pnotes_end; pnote ++)
|
||||
{
|
||||
int note_type;
|
||||
objcopy_internal_note * back;
|
||||
objcopy_internal_note * prev_open_with_range = NULL;
|
||||
|
||||
+ /* Rule 6 - delete 0-range notes. */
|
||||
+ if (pnote->start == pnote->end)
|
||||
+ {
|
||||
+ duplicate_found = TRUE;
|
||||
+ pnote->note.type = 0;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
/* Rule 2 - preserve function notes. */
|
||||
if (! is_open_note (pnote))
|
||||
- continue;
|
||||
+ {
|
||||
+ int iter;
|
||||
+
|
||||
+ /* Check to see if there is an identical previous function note.
|
||||
+ This can happen with overlays for example. */
|
||||
+ for (iter = 0, back = pnote -1; back >= pnotes; back --)
|
||||
+ {
|
||||
+ if (back->start == pnote->start
|
||||
+ && back->end == pnote->end
|
||||
+ && back->note.namesz == pnote->note.namesz
|
||||
+ && memcmp (back->note.namedata, pnote->note.namedata, pnote->note.namesz) == 0)
|
||||
+ {
|
||||
+ fprintf (stderr, "DUP FUNXC\n");
|
||||
+ duplicate_found = TRUE;
|
||||
+ pnote->note.type = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Don't scan too far back however. */
|
||||
+ if (iter ++ > 16)
|
||||
+ break;
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
note_type = pnote->note.namedata[attribute_type_byte];
|
||||
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
diff -rup binutils.orig/binutils/readelf.c binutils-2.29/binutils/readelf.c
|
||||
--- binutils.orig/binutils/readelf.c 2017-12-12 16:24:19.571221194 +0000
|
||||
+++ binutils-2.29/binutils/readelf.c 2017-12-12 16:27:26.997979803 +0000
|
||||
@@ -11018,12 +11018,14 @@ print_dynamic_symbol (bfd_vma si, unsign
|
||||
unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
|
||||
|
||||
printf (" %-7s", get_symbol_visibility (vis));
|
||||
+#if 0
|
||||
/* Check to see if any other bits in the st_other field are set.
|
||||
Note - displaying this information disrupts the layout of the
|
||||
table being generated, but for the moment this case is very
|
||||
rare. */
|
||||
if (psym->st_other ^ vis)
|
||||
printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
|
||||
+#endif
|
||||
}
|
||||
|
||||
printf (" %3.3s ", get_symbol_index_type (filedata, psym->st_shndx));
|
||||
@@ -11031,6 +11033,15 @@ print_dynamic_symbol (bfd_vma si, unsign
|
||||
print_symbol (25, GET_DYNAMIC_NAME (psym->st_name));
|
||||
else
|
||||
printf (_(" <corrupt: %14ld>"), psym->st_name);
|
||||
+#if 1
|
||||
+ {
|
||||
+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
|
||||
+
|
||||
+ /* Check to see if any other bits in the st_other field are set. */
|
||||
+ if (psym->st_other ^ vis)
|
||||
+ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis));
|
||||
+ }
|
||||
+#endif
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
--- binutils.orig/binutils/readelf.c 2017-12-12 16:36:21.806561149 +0000
|
||||
+++ binutils-2.29.1/binutils/readelf.c 2017-12-12 16:38:17.763168514 +0000
|
||||
@@ -11548,11 +11548,13 @@ process_symbol_table (FILE * file)
|
||||
unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
|
||||
|
||||
printf (" %-7s", get_symbol_visibility (vis));
|
||||
+#if 0
|
||||
/* Check to see if any other bits in the st_other field are set.
|
||||
Note - displaying this information disrupts the layout of the
|
||||
table being generated, but for the moment this case is very rare. */
|
||||
if (psym->st_other ^ vis)
|
||||
printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
|
||||
+#endif
|
||||
}
|
||||
printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx));
|
||||
print_symbol (25, psym->st_name < strtab_size
|
||||
@@ -11571,7 +11573,15 @@ process_symbol_table (FILE * file)
|
||||
printf (sym_info == symbol_hidden ? "@%s" : "@@%s",
|
||||
version_string);
|
||||
}
|
||||
+#if 1
|
||||
+ {
|
||||
+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
|
||||
|
||||
+ /* Check to see if any other bits in the st_other field are set. */
|
||||
+ if (psym->st_other ^ vis)
|
||||
+ printf (" \t[%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
|
||||
+ }
|
||||
+#endif
|
||||
putchar ('\n');
|
||||
|
||||
if (ELF_ST_BIND (psym->st_info) == STB_LOCAL
|
||||
33
binutils-remove-ld-protected-func-2-test.patch
Normal file
33
binutils-remove-ld-protected-func-2-test.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-x86-64/x86-64.exp
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2025-11-20 12:02:23.738336155 +0000
|
||||
+++ binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-x86-64/x86-64.exp 2025-11-20 12:03:17.894485264 +0000
|
||||
@@ -1413,14 +1413,6 @@ if { [isnative] && [check_compiler_avail
|
||||
"libprotected-func-2b.so" \
|
||||
] \
|
||||
[list \
|
||||
- "Build protected-func-2 without PIE" \
|
||||
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2b.so" \
|
||||
- "$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
|
||||
- { protected-func-1b.c } \
|
||||
- {} \
|
||||
- "protected-func-2" \
|
||||
- ] \
|
||||
- [list \
|
||||
"Build libprotected-func-2c.so" \
|
||||
"-shared" \
|
||||
"-fPIC -Wa,-mx86-used-note=yes" \
|
||||
@@ -1429,14 +1421,6 @@ if { [isnative] && [check_compiler_avail
|
||||
"libprotected-func-2c.so" \
|
||||
] \
|
||||
[list \
|
||||
- "Build protected-func-2a without PIE" \
|
||||
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2c.so" \
|
||||
- "$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
|
||||
- { protected-func-1b.c } \
|
||||
- {} \
|
||||
- "protected-func-2a" \
|
||||
- ] \
|
||||
- [list \
|
||||
"Build libprotected-data-1a.so" \
|
||||
"-shared -z noindirect-extern-access" \
|
||||
"-fPIC -Wa,-mx86-used-note=yes" \
|
||||
|
|
@ -67,29 +67,6 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.29.1/ld/tes
|
|||
#...
|
||||
+0x[0-9a-f]+ +\(PLTREL.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd 2017-11-15 13:32:39.405064420 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd 2017-11-15 15:06:53.694623801 +0000
|
||||
@@ -1,7 +1,4 @@
|
||||
-#...
|
||||
-Disassembly of section .plt.got:
|
||||
|
||||
-[a-f0-9]+ <[a-z_]+@plt>:
|
||||
-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <.*>
|
||||
+#...
|
||||
[ ]*[a-f0-9]+: 90 nop
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 13:32:39.412064336 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 15:06:35.148842897 +0000
|
||||
@@ -1,7 +1,3 @@
|
||||
#...
|
||||
-Disassembly of section .plt.got:
|
||||
-
|
||||
-[a-f0-9]+ <[_a-z]+@plt>:
|
||||
[ ]*[a-f0-9]+: f3 0f 1e fa endbr64
|
||||
-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <[_a-z]+>
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000
|
||||
|
|
@ -146,82 +123,6 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.29.1/ld
|
|||
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 13:32:39.408064384 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 15:19:48.097433680 +0000
|
||||
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 13:32:39.401064469 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 15:10:56.077760324 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 13:32:39.405064420 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 15:10:42.828916844 +0000
|
||||
@@ -19,6 +19,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 13:32:39.416064288 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 15:11:11.550577531 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 13:32:39.411064348 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 15:09:52.664509478 +0000
|
||||
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 15:11:22.975442559 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 13:32:39.417064276 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 15:05:02.950932110 +0000
|
||||
269
binutils-riscv-testsuite-fixes.patch
Normal file
269
binutils-riscv-testsuite-fixes.patch
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/attr-phdr.d binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-02-16 10:11:38.656875289 +0000
|
||||
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-02-16 10:49:26.786573665 +0000
|
||||
@@ -12,8 +12,8 @@ Program Headers:
|
||||
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
||||
RISCV_ATTRIBUT .*
|
||||
LOAD .*
|
||||
-
|
||||
+#...
|
||||
Section to Segment mapping:
|
||||
Segment Sections...
|
||||
00 .riscv.attributes
|
||||
- 01 .text
|
||||
+#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-02-16 10:11:38.659875285 +0000
|
||||
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-02-16 10:42:54.803431287 +0000
|
||||
@@ -8,7 +8,7 @@
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+[0-9a-f]+ <_start>:
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+
|
||||
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-02-16 10:11:38.659875285 +0000
|
||||
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-02-16 10:43:49.540306593 +0000
|
||||
@@ -11,5 +11,5 @@ Disassembly of section .text:
|
||||
[0-9a-f]+ <_start>:
|
||||
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.*
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,gp.*<data_a>
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1.*<data_b>
|
||||
+.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-02-16 10:11:38.659875285 +0000
|
||||
+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-02-16 10:46:55.570899994 +0000
|
||||
@@ -2,4 +2,5 @@
|
||||
#source: pcrel-lo-addend-2a.s
|
||||
#as: -march=rv32ic
|
||||
#ld: -m[riscv_choose_ilp32_emul] --no-relax
|
||||
+#skip: *-*-*
|
||||
#error: .*dangerous relocation: %pcrel_lo overflow with an addend, the value of %pcrel_hi is 0x1000 without any addend, but may be 0x2000 after adding the %pcrel_lo addend
|
||||
diff -rup binutils.orig/ld/testsuite/ld-elf/dwarf.exp binutils-2.40/ld/testsuite/ld-elf/dwarf.exp
|
||||
--- binutils.orig/ld/testsuite/ld-elf/dwarf.exp 2023-02-16 10:11:38.515875516 +0000
|
||||
+++ binutils-2.40/ld/testsuite/ld-elf/dwarf.exp 2023-02-16 11:08:52.209377332 +0000
|
||||
@@ -29,6 +29,10 @@ if ![is_elf_format] {
|
||||
return
|
||||
}
|
||||
|
||||
+if { [istarget riscv*-*-*] } then {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
# Skip targets where -shared is not supported
|
||||
|
||||
if ![check_shared_lib_support] {
|
||||
diff -rup binutils.orig/ld/testsuite/ld-elf/tls.exp binutils-2.40/ld/testsuite/ld-elf/tls.exp
|
||||
--- binutils.orig/ld/testsuite/ld-elf/tls.exp 2023-02-16 10:11:38.540875476 +0000
|
||||
+++ binutils-2.40/ld/testsuite/ld-elf/tls.exp 2023-02-16 11:08:56.944369374 +0000
|
||||
@@ -28,6 +28,10 @@ if { !([istarget *-*-linux*]
|
||||
return
|
||||
}
|
||||
|
||||
+if { [istarget riscv*-*-*] } then {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
# Check to see if the C compiler works.
|
||||
if { ![check_compiler_available] } {
|
||||
return
|
||||
--- binutils.orig/binutils/testsuite/binutils-all/objcopy.exp 2023-08-24 07:48:30.429195480 +0100
|
||||
+++ binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp 2023-08-24 07:57:05.535302711 +0100
|
||||
@@ -1409,6 +1409,8 @@ proc objcopy_test_without_global_symbol
|
||||
# The AArch64 and ARM targets preserve mapping symbols
|
||||
# in object files, so they will fail this test.
|
||||
setup_xfail aarch64*-*-* arm*-*-*
|
||||
+# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||
+setup_xfail riscv*-*-*
|
||||
|
||||
objcopy_test_without_global_symbol
|
||||
|
||||
--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2023-08-24 07:48:31.808196076 +0100
|
||||
+++ binutils-2.41/ld/testsuite/ld-plugin/plugin.exp 2023-08-24 07:59:30.285716568 +0100
|
||||
@@ -132,6 +132,10 @@ if [is_pecoff_format] {
|
||||
append libs " --image-base=0x10000000"
|
||||
}
|
||||
|
||||
+if { [istarget riscv*-*-*] } then {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
set plugin_tests [list \
|
||||
[list "load plugin" "-plugin $plugin_path \
|
||||
$testobjfiles $libs" "" "" "" {{ld plugin-1.d}} "main.x" ] \
|
||||
--- binutils.orig/binutils/testsuite/binutils-all/compress.exp 2023-12-11 10:09:16.923374463 +0000
|
||||
+++ binutils-2.41/binutils/testsuite/binutils-all/compress.exp 2023-12-12 09:00:15.150036675 +0000
|
||||
@@ -818,6 +818,10 @@ proc test_gnu_debuglink {} {
|
||||
}
|
||||
}
|
||||
|
||||
+if { [istarget riscv*-*-*] } then {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
if {[is_elf_format]} then {
|
||||
test_gnu_debuglink
|
||||
}
|
||||
--- binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2023-07-03 00:00:00.000000000 +0100
|
||||
+++ binutils.new/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2023-12-12 11:52:54.564057931 +0000
|
||||
@@ -8,10 +8,10 @@
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+[0-9a-f]+ <_start>:
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+
|
||||
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1,0x[0-9a-f]+
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,[0-9]+ # [0-9a-f]+ <data_g>
|
||||
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||
.*:[ ]+[0-9a-f]+[ ]+lui[ ]+a2,0x[0-9a-f]+
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,a2,[0-9]+ # [0-9a-f]+ <data_g>
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a3,tp,0 # 0 <data_t>
|
||||
--- binutils.orig/binutils/testsuite/binutils-all/objcopy.exp 2023-12-12 14:21:10.225342926 +0000
|
||||
+++ binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp 2023-12-12 14:22:12.453421499 +0000
|
||||
@@ -1410,7 +1410,7 @@ proc objcopy_test_without_global_symbol
|
||||
# in object files, so they will fail this test.
|
||||
setup_xfail aarch64*-*-* arm*-*-*
|
||||
# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||
-setup_xfail riscv*-*-*
|
||||
+# setup_xfail riscv*-*-*
|
||||
|
||||
objcopy_test_without_global_symbol
|
||||
|
||||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2024-10-03 15:21:47.926570551 +0100
|
||||
+++ binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2024-10-03 15:24:26.152502612 +0100
|
||||
@@ -8,10 +8,10 @@
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+[0-9a-f]+ <_start>:
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,.*
|
||||
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1,0x[0-9a-f]+
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,.*
|
||||
.*:[ ]+[0-9a-f]+[ ]+lui[ ]+a2,0x[0-9a-f]+
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,a2,[0-9]+ # [0-9a-f]+ <data_g>
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a3,tp,0 # 0 <data_t>
|
||||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2024-10-03 15:21:47.926570551 +0100
|
||||
+++ binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2024-10-03 15:23:54.512530979 +0100
|
||||
@@ -8,7 +8,7 @@
|
||||
Disassembly of section \.text:
|
||||
|
||||
0+[0-9a-f]+ <_start>:
|
||||
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,.*
|
||||
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d
|
||||
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2024-10-03 15:21:47.926570551 +0100
|
||||
+++ binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2024-10-03 15:25:01.687468496 +0100
|
||||
@@ -11,5 +11,5 @@ Disassembly of section .text:
|
||||
[0-9a-f]+ <_start>:
|
||||
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.*
|
||||
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,gp.*<data_a>
|
||||
-.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1
|
||||
+.*:[ ]+[0-9a-f]+[ ]+.*
|
||||
#pass
|
||||
--- binutils-with-gold-2.45.50-79b2b564fec.orig/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d 2025-09-09 15:52:30.684689609 +0100
|
||||
+++ binutils-with-gold-2.45.50-79b2b564fec/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d 2025-09-09 15:53:12.837859447 +0100
|
||||
@@ -30,6 +30,6 @@ Disassembly of section \.plt:
|
||||
|
||||
[0-9a-f]+ <bar@plt>:
|
||||
.*:[ ]+[0-9a-f]+[ ]+lpad[ ]+0x0
|
||||
-.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t3,0x1
|
||||
+.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t3,0x[0-9a-f]+
|
||||
.*:[ ]+[0-9a-f]+[ ]+ld[ ]+t3,[0-9]+\(t3\) # [0-9a-f]+ <bar>
|
||||
.*:[ ]+[0-9a-f]+[ ]+jalr[ ]+t1,t3
|
||||
diff -rup binutils-with-gold-2.45.50-beab972c07d,orig/binutils/testsuite/binutils-all/objcopy.exp binutils-with-gold-2.45.50-beab972c07d/binutils/testsuite/binutils-all/objcopy.exp
|
||||
--- binutils-with-gold-2.45.50-beab972c07d,orig/binutils/testsuite/binutils-all/objcopy.exp 2025-12-02 12:47:19.063123207 +0000
|
||||
+++ binutils-with-gold-2.45.50-beab972c07d/binutils/testsuite/binutils-all/objcopy.exp 2025-12-04 12:39:26.079989597 +0000
|
||||
@@ -602,14 +602,19 @@ proc strip_test { } {
|
||||
set exec_output [binutils_run $STRIP "$STRIPFLAGS $objfile"]
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
if ![string equal "" $exec_output] {
|
||||
- fail $test
|
||||
+ fail "$test (warnings in linker output)"
|
||||
+ verbose $exec_output
|
||||
return
|
||||
}
|
||||
|
||||
set exec_output [binutils_run $NM "-a $NMFLAGS $objfile"]
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
if ![string match "*: no symbols*" $exec_output] {
|
||||
- fail $test
|
||||
+
|
||||
+ # The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||
+ setup_xfail riscv*-*-*
|
||||
+
|
||||
+ fail "$test (symbols in nm output)"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -659,6 +664,9 @@ proc strip_test_with_saving_a_symbol { }
|
||||
pass $test
|
||||
}
|
||||
|
||||
+# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||
+setup_xfail riscv*-*-*
|
||||
+
|
||||
strip_test_with_saving_a_symbol
|
||||
|
||||
# Test stripping an archive.
|
||||
@@ -1503,7 +1519,7 @@ proc objcopy_test_without_global_symbol
|
||||
# in object files, so they will fail this test.
|
||||
setup_xfail aarch64*-*-* arm*-*-*
|
||||
# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||
-# setup_xfail riscv*-*-*
|
||||
+setup_xfail riscv*-*-*
|
||||
|
||||
objcopy_test_without_global_symbol
|
||||
|
||||
diff -rup binutils-with-gold-2.45.50-beab972c07d,orig/ld/testsuite/lib/ld-lib.exp binutils-with-gold-2.45.50-beab972c07d/ld/testsuite/lib/ld-lib.exp
|
||||
--- binutils-with-gold-2.45.50-beab972c07d,orig/ld/testsuite/lib/ld-lib.exp 2025-12-02 12:47:19.201090894 +0000
|
||||
+++ binutils-with-gold-2.45.50-beab972c07d/ld/testsuite/lib/ld-lib.exp 2025-12-03 09:30:07.184360005 +0000
|
||||
@@ -1633,6 +1633,12 @@ proc compile_one_cc { src output additio
|
||||
proc check_ctf_available { } {
|
||||
global ctf_available_saved
|
||||
|
||||
+ # Skip CTF tests for the Risc-V target for now, as the
|
||||
+ # tests have not been tweaked to support the riscv format.
|
||||
+ if { [istarget "riscv*-*-linux*"] } {
|
||||
+ return 0
|
||||
+ }
|
||||
+
|
||||
if {![info exists ctf_available_saved]} {
|
||||
set ctf_available_saved 0
|
||||
|
||||
--- fred/binutils/testsuite/lib/binutils-common.exp 2026-03-16 09:18:37.205413649 +0000
|
||||
+++ binutils-with-gold-2.46.50-d712202846b/binutils/testsuite/lib/binutils-common.exp 2026-03-16 09:18:49.559358668 +0000
|
||||
@@ -803,6 +803,9 @@ proc prune_warnings_extra { text } {
|
||||
# Ignore warnings about linking objects with an old sframe format
|
||||
regsub -all {(^|\n)([^\n]* unexpected SFrame format version [^\n]*\n[^\n]* SFrame section ignored\n?)+} $text {\1} text
|
||||
|
||||
+ # Skip warnings about the LTO plugin being needed.
|
||||
+ regsub -all "(^|\n)(\[^\n\]*:\[^\n\]*plugin needed to handle lto object\[^\n\]*\n?)+" $text "\\1" text
|
||||
+
|
||||
return $text
|
||||
}
|
||||
|
||||
--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2026-06-10 15:32:21.012274073 +0100
|
||||
+++ binutils-with-gold-2.46.50-48997323b0f/ld/testsuite/ld-elf/shared.exp 2026-06-10 15:34:41.397899263 +0100
|
||||
@@ -1859,6 +1859,10 @@ run_cc_link_tests [list \
|
||||
"pr29655.so" \
|
||||
] \
|
||||
]
|
||||
+
|
||||
+# FIXME: Find out why the Risc-V fails this test.
|
||||
+setup_xfail "riscv64-*-*"
|
||||
+
|
||||
# PR 29655 (cont.): Check that in PIC code linked as PDE taking the address
|
||||
# of a function defined in a DSO results in the function address (from GOT)
|
||||
# and not the "canonical PLT" address from the PDE.
|
||||
|
|
@ -1,872 +0,0 @@
|
|||
diff -rup binutils.orig/bfd/elf64-s390.c binutils-2.31.1/bfd/elf64-s390.c
|
||||
--- binutils.orig/bfd/elf64-s390.c 2018-07-19 12:37:28.107030007 +0100
|
||||
+++ binutils-2.31.1/bfd/elf64-s390.c 2018-07-19 12:38:11.235548717 +0100
|
||||
@@ -481,7 +481,7 @@ elf_s390_is_local_label_name (bfd *abfd,
|
||||
|
||||
#define RELA_ENTRY_SIZE sizeof (Elf64_External_Rela)
|
||||
|
||||
-/* The first three entries in a procedure linkage table are reserved,
|
||||
+/* The first three entries in a global offset table are reserved,
|
||||
and the initial contents are unimportant (we zero them out).
|
||||
Subsequent entries look like this. See the SVR4 ABI 386
|
||||
supplement to see how this works. */
|
||||
@@ -511,8 +511,8 @@ elf_s390_is_local_label_name (bfd *abfd,
|
||||
LG 1,0(1) # 6 bytes Load address from GOT in r1
|
||||
BCR 15,1 # 2 bytes Jump to address
|
||||
RET1: BASR 1,0 # 2 bytes Return from GOT 1st time
|
||||
- LGF 1,12(1) # 6 bytes Load offset in symbl table in r1
|
||||
- BRCL 15,-x # 6 bytes Jump to start of PLT
|
||||
+ LGF 1,12(1) # 6 bytes Load rela.plt offset into r1
|
||||
+ BRCL 15,-x # 6 bytes Jump to first PLT entry
|
||||
.long ? # 4 bytes offset into .rela.plt
|
||||
|
||||
Total = 32 bytes per PLT entry
|
||||
@@ -1605,8 +1605,7 @@ allocate_dynrelocs (struct elf_link_hash
|
||||
/* Make room for this entry. */
|
||||
s->size += PLT_ENTRY_SIZE;
|
||||
|
||||
- /* We also need to make an entry in the .got.plt section, which
|
||||
- will be placed in the .got section by the linker script. */
|
||||
+ /* We also need to make an entry in the .got.plt section. */
|
||||
htab->elf.sgotplt->size += GOT_ENTRY_SIZE;
|
||||
|
||||
/* We also need to make an entry in the .rela.plt section. */
|
||||
@@ -1831,6 +1830,20 @@ elf_s390_size_dynamic_sections (bfd *out
|
||||
}
|
||||
}
|
||||
|
||||
+ if (htab->elf.sgot && s390_gotplt_after_got_p (info))
|
||||
+ {
|
||||
+ /* _bfd_elf_create_got_section adds the got header size always
|
||||
+ to .got.plt but we need it in .got if this section comes
|
||||
+ first. */
|
||||
+ htab->elf.sgot->size += 3 * GOT_ENTRY_SIZE;
|
||||
+ htab->elf.sgotplt->size -= 3 * GOT_ENTRY_SIZE;
|
||||
+
|
||||
+ /* Make the _GLOBAL_OFFSET_TABLE_ symbol point to the .got
|
||||
+ instead of .got.plt. */
|
||||
+ htab->elf.hgot->root.u.def.section = htab->elf.sgot;
|
||||
+ htab->elf.hgot->root.u.def.value = 0;
|
||||
+ }
|
||||
+
|
||||
/* Set up .got offsets for local syms, and space for local dynamic
|
||||
relocs. */
|
||||
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
|
||||
@@ -2131,7 +2144,6 @@ elf_s390_relocate_section (bfd *output_b
|
||||
bfd_boolean unresolved_reloc;
|
||||
bfd_reloc_status_type r;
|
||||
int tls_type;
|
||||
- asection *base_got = htab->elf.sgot;
|
||||
bfd_boolean resolved_to_zero;
|
||||
|
||||
r_type = ELF64_R_TYPE (rel->r_info);
|
||||
@@ -2172,7 +2184,7 @@ elf_s390_relocate_section (bfd *output_b
|
||||
case R_390_PLTOFF16:
|
||||
case R_390_PLTOFF32:
|
||||
case R_390_PLTOFF64:
|
||||
- relocation -= htab->elf.sgot->output_section->vma;
|
||||
+ relocation -= s390_got_pointer (info);
|
||||
break;
|
||||
case R_390_GOTPLT12:
|
||||
case R_390_GOTPLT16:
|
||||
@@ -2192,10 +2204,10 @@ elf_s390_relocate_section (bfd *output_b
|
||||
htab->elf.sgot->contents +
|
||||
local_got_offsets[r_symndx]);
|
||||
relocation = (local_got_offsets[r_symndx] +
|
||||
- htab->elf.sgot->output_offset);
|
||||
+ s390_got_offset (info));
|
||||
|
||||
if (r_type == R_390_GOTENT || r_type == R_390_GOTPLTENT)
|
||||
- relocation += htab->elf.sgot->output_section->vma;
|
||||
+ relocation += s390_got_pointer (info);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -2254,25 +2266,23 @@ elf_s390_relocate_section (bfd *output_b
|
||||
|
||||
if (s390_is_ifunc_symbol_p (h))
|
||||
{
|
||||
+ /* Entry indices of .iplt and .igot.plt match
|
||||
+ 1:1. No magic PLT first entry here. */
|
||||
plt_index = h->plt.offset / PLT_ENTRY_SIZE;
|
||||
- relocation = (plt_index * GOT_ENTRY_SIZE +
|
||||
- htab->elf.igotplt->output_offset);
|
||||
- if (r_type == R_390_GOTPLTENT)
|
||||
- relocation += htab->elf.igotplt->output_section->vma;
|
||||
+ relocation = (plt_index * GOT_ENTRY_SIZE
|
||||
+ + s390_gotplt_offset (info)
|
||||
+ + htab->elf.igotplt->output_offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
- /* Calc. index no.
|
||||
- Current offset - size first entry / entry size. */
|
||||
- plt_index = (h->plt.offset - PLT_FIRST_ENTRY_SIZE) /
|
||||
- PLT_ENTRY_SIZE;
|
||||
-
|
||||
- /* Offset in GOT is PLT index plus GOT headers(3)
|
||||
- times 8, addr & GOT addr. */
|
||||
- relocation = (plt_index + 3) * GOT_ENTRY_SIZE;
|
||||
- if (r_type == R_390_GOTPLTENT)
|
||||
- relocation += htab->elf.sgot->output_section->vma;
|
||||
+ plt_index = ((h->plt.offset - PLT_FIRST_ENTRY_SIZE)
|
||||
+ / PLT_ENTRY_SIZE);
|
||||
+
|
||||
+ relocation = (plt_index * GOT_ENTRY_SIZE
|
||||
+ + s390_gotplt_offset (info));
|
||||
}
|
||||
+ if (r_type == R_390_GOTPLTENT)
|
||||
+ relocation += s390_got_pointer (info);
|
||||
unresolved_reloc = FALSE;
|
||||
break;
|
||||
}
|
||||
@@ -2286,7 +2296,7 @@ elf_s390_relocate_section (bfd *output_b
|
||||
case R_390_GOTENT:
|
||||
/* Relocation is to the entry for this symbol in the global
|
||||
offset table. */
|
||||
- if (base_got == NULL)
|
||||
+ if (htab->elf.sgot == NULL)
|
||||
abort ();
|
||||
|
||||
if (h != NULL)
|
||||
@@ -2303,8 +2313,19 @@ elf_s390_relocate_section (bfd *output_b
|
||||
{
|
||||
/* No explicit GOT usage so redirect to the
|
||||
got.iplt slot. */
|
||||
- base_got = htab->elf.igotplt;
|
||||
- off = h->plt.offset / PLT_ENTRY_SIZE * GOT_ENTRY_SIZE;
|
||||
+ relocation = (s390_gotplt_offset (info)
|
||||
+ + htab->elf.igotplt->output_offset
|
||||
+ + (h->plt.offset / PLT_ENTRY_SIZE
|
||||
+ * GOT_ENTRY_SIZE));
|
||||
+
|
||||
+ /* For @GOTENT the relocation is against the offset between
|
||||
+ the instruction and the symbols entry in the GOT and not
|
||||
+ between the start of the GOT and the symbols entry. We
|
||||
+ add the vma of the GOT to get the correct value. */
|
||||
+ if (r_type == R_390_GOTENT || r_type == R_390_GOTPLTENT)
|
||||
+ relocation += s390_got_pointer (info);
|
||||
+
|
||||
+ break;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2337,7 +2358,7 @@ elf_s390_relocate_section (bfd *output_b
|
||||
else
|
||||
{
|
||||
bfd_put_64 (output_bfd, relocation,
|
||||
- base_got->contents + off);
|
||||
+ htab->elf.sgot->contents + off);
|
||||
h->got.offset |= 1;
|
||||
}
|
||||
|
||||
@@ -2419,7 +2440,7 @@ elf_s390_relocate_section (bfd *output_b
|
||||
if (off >= (bfd_vma) -2)
|
||||
abort ();
|
||||
|
||||
- relocation = base_got->output_offset + off;
|
||||
+ relocation = s390_got_offset (info) + off;
|
||||
|
||||
/* For @GOTENT the relocation is against the offset between
|
||||
the instruction and the symbols entry in the GOT and not
|
||||
@@ -2427,7 +2448,7 @@ elf_s390_relocate_section (bfd *output_b
|
||||
add the vma of the GOT to get the correct value. */
|
||||
if ( r_type == R_390_GOTENT
|
||||
|| r_type == R_390_GOTPLTENT)
|
||||
- relocation += base_got->output_section->vma;
|
||||
+ relocation += s390_got_pointer (info);
|
||||
|
||||
break;
|
||||
|
||||
@@ -2445,22 +2466,17 @@ elf_s390_relocate_section (bfd *output_b
|
||||
relocation = (htab->elf.iplt->output_section->vma
|
||||
+ htab->elf.iplt->output_offset
|
||||
+ h->plt.offset
|
||||
- - htab->elf.sgot->output_section->vma);
|
||||
+ - s390_got_pointer (info));
|
||||
goto do_relocation;
|
||||
}
|
||||
|
||||
- /* Note that sgot->output_offset is not involved in this
|
||||
- calculation. We always want the start of .got. If we
|
||||
- defined _GLOBAL_OFFSET_TABLE in a different way, as is
|
||||
- permitted by the ABI, we might have to change this
|
||||
- calculation. */
|
||||
- relocation -= htab->elf.sgot->output_section->vma;
|
||||
+ relocation -= s390_got_pointer (info);
|
||||
break;
|
||||
|
||||
case R_390_GOTPC:
|
||||
case R_390_GOTPCDBL:
|
||||
/* Use global offset table as symbol value. */
|
||||
- relocation = htab->elf.sgot->output_section->vma;
|
||||
+ relocation = s390_got_pointer (info);
|
||||
unresolved_reloc = FALSE;
|
||||
break;
|
||||
|
||||
@@ -2509,7 +2525,7 @@ elf_s390_relocate_section (bfd *output_b
|
||||
|| h->plt.offset == (bfd_vma) -1
|
||||
|| (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
|
||||
{
|
||||
- relocation -= htab->elf.sgot->output_section->vma;
|
||||
+ relocation -= s390_got_pointer (info);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2517,12 +2533,12 @@ elf_s390_relocate_section (bfd *output_b
|
||||
relocation = (htab->elf.iplt->output_section->vma
|
||||
+ htab->elf.iplt->output_offset
|
||||
+ h->plt.offset
|
||||
- - htab->elf.sgot->output_section->vma);
|
||||
+ - s390_got_pointer (info));
|
||||
else
|
||||
relocation = (htab->elf.splt->output_section->vma
|
||||
+ htab->elf.splt->output_offset
|
||||
+ h->plt.offset
|
||||
- - htab->elf.sgot->output_section->vma);
|
||||
+ - s390_got_pointer (info));
|
||||
unresolved_reloc = FALSE;
|
||||
break;
|
||||
|
||||
@@ -3296,7 +3312,7 @@ elf_s390_finish_dynamic_symbol (bfd *out
|
||||
if (h->plt.offset != (bfd_vma) -1)
|
||||
{
|
||||
bfd_vma plt_index;
|
||||
- bfd_vma got_offset;
|
||||
+ bfd_vma gotplt_offset;
|
||||
Elf_Internal_Rela rela;
|
||||
bfd_byte *loc;
|
||||
|
||||
@@ -3325,18 +3341,25 @@ elf_s390_finish_dynamic_symbol (bfd *out
|
||||
Current offset - size first entry / entry size. */
|
||||
plt_index = (h->plt.offset - PLT_FIRST_ENTRY_SIZE) / PLT_ENTRY_SIZE;
|
||||
|
||||
- /* Offset in GOT is PLT index plus GOT headers(3) times 8,
|
||||
- addr & GOT addr. */
|
||||
- got_offset = (plt_index + 3) * GOT_ENTRY_SIZE;
|
||||
+ /* The slots in the .got.plt correspond to the PLT slots in
|
||||
+ the same order. */
|
||||
+ gotplt_offset = plt_index * GOT_ENTRY_SIZE;
|
||||
+
|
||||
+ /* If .got.plt comes first it needs to contain the 3 header
|
||||
+ entries. */
|
||||
+ if (!s390_gotplt_after_got_p (info))
|
||||
+ gotplt_offset += 3 * GOT_ENTRY_SIZE;
|
||||
|
||||
/* Fill in the blueprint of a PLT. */
|
||||
memcpy (htab->elf.splt->contents + h->plt.offset, elf_s390x_plt_entry,
|
||||
PLT_ENTRY_SIZE);
|
||||
|
||||
- /* Fixup the relative address to the GOT entry */
|
||||
+ /* The first instruction in the PLT entry is a LARL loading
|
||||
+ the address of the GOT slot. We write the 4 byte
|
||||
+ immediate operand of the LARL instruction here. */
|
||||
bfd_put_32 (output_bfd,
|
||||
(htab->elf.sgotplt->output_section->vma +
|
||||
- htab->elf.sgotplt->output_offset + got_offset
|
||||
+ htab->elf.sgotplt->output_offset + gotplt_offset
|
||||
- (htab->elf.splt->output_section->vma +
|
||||
htab->elf.splt->output_offset +
|
||||
h->plt.offset))/2,
|
||||
@@ -3356,12 +3379,12 @@ elf_s390_finish_dynamic_symbol (bfd *out
|
||||
+ htab->elf.splt->output_offset
|
||||
+ h->plt.offset
|
||||
+ 14),
|
||||
- htab->elf.sgotplt->contents + got_offset);
|
||||
+ htab->elf.sgotplt->contents + gotplt_offset);
|
||||
|
||||
/* Fill in the entry in the .rela.plt section. */
|
||||
rela.r_offset = (htab->elf.sgotplt->output_section->vma
|
||||
+ htab->elf.sgotplt->output_offset
|
||||
- + got_offset);
|
||||
+ + gotplt_offset);
|
||||
rela.r_info = ELF64_R_INFO (h->dynindx, R_390_JMP_SLOT);
|
||||
rela.r_addend = 0;
|
||||
loc = htab->elf.srelplt->contents + plt_index *
|
||||
@@ -3568,8 +3591,8 @@ elf_s390_finish_dynamic_sections (bfd *o
|
||||
continue;
|
||||
|
||||
case DT_PLTGOT:
|
||||
- s = htab->elf.sgotplt;
|
||||
- dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
|
||||
+ /* DT_PLTGOT matches _GLOBAL_OFFSET_TABLE_ */
|
||||
+ dyn.d_un.d_ptr = s390_got_pointer (info);
|
||||
break;
|
||||
|
||||
case DT_JMPREL:
|
||||
@@ -3606,10 +3629,11 @@ elf_s390_finish_dynamic_sections (bfd *o
|
||||
/* fill in blueprint for plt 0 entry */
|
||||
memcpy (htab->elf.splt->contents, elf_s390x_first_plt_entry,
|
||||
PLT_FIRST_ENTRY_SIZE);
|
||||
- /* Fixup relative address to start of GOT */
|
||||
+ /* The second instruction in the first PLT entry is a LARL
|
||||
+ loading the GOT pointer. Fill in the LARL immediate
|
||||
+ address. */
|
||||
bfd_put_32 (output_bfd,
|
||||
- (htab->elf.sgotplt->output_section->vma
|
||||
- + htab->elf.sgotplt->output_offset
|
||||
+ (s390_got_pointer (info)
|
||||
- htab->elf.splt->output_section->vma
|
||||
- htab->elf.splt->output_offset - 6)/2,
|
||||
htab->elf.splt->contents + 8);
|
||||
@@ -3619,21 +3643,22 @@ elf_s390_finish_dynamic_sections (bfd *o
|
||||
= PLT_ENTRY_SIZE;
|
||||
}
|
||||
|
||||
- if (htab->elf.sgotplt)
|
||||
+ if (htab->elf.hgot && htab->elf.hgot->root.u.def.section)
|
||||
{
|
||||
/* Fill in the first three entries in the global offset table. */
|
||||
- if (htab->elf.sgotplt->size > 0)
|
||||
+ if (htab->elf.hgot->root.u.def.section->size > 0)
|
||||
{
|
||||
bfd_put_64 (output_bfd,
|
||||
(sdyn == NULL ? (bfd_vma) 0
|
||||
: sdyn->output_section->vma + sdyn->output_offset),
|
||||
- htab->elf.sgotplt->contents);
|
||||
+ htab->elf.hgot->root.u.def.section->contents);
|
||||
/* One entry for shared object struct ptr. */
|
||||
- bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 8);
|
||||
+ bfd_put_64 (output_bfd, (bfd_vma) 0,
|
||||
+ htab->elf.hgot->root.u.def.section->contents + 8);
|
||||
/* One entry for _dl_runtime_resolve. */
|
||||
- bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + 16);
|
||||
+ bfd_put_64 (output_bfd, (bfd_vma) 0,
|
||||
+ htab->elf.hgot->root.u.def.section->contents + 16);
|
||||
}
|
||||
-
|
||||
elf_section_data (htab->elf.sgot->output_section)
|
||||
->this_hdr.sh_entsize = 8;
|
||||
}
|
||||
diff -rup binutils.orig/bfd/elf-s390-common.c binutils-2.31.1/bfd/elf-s390-common.c
|
||||
--- binutils.orig/bfd/elf-s390-common.c 2018-07-19 12:37:28.113029940 +0100
|
||||
+++ binutils-2.31.1/bfd/elf-s390-common.c 2018-07-19 12:38:11.235548717 +0100
|
||||
@@ -30,6 +30,87 @@ s390_is_ifunc_symbol_p (struct elf_link_
|
||||
return h->type == STT_GNU_IFUNC || eh->ifunc_resolver_address != 0;
|
||||
}
|
||||
|
||||
+/* Return true if .got.plt is supposed to be emitted after .got. */
|
||||
+
|
||||
+static inline bfd_boolean
|
||||
+s390_gotplt_after_got_p (struct bfd_link_info *info)
|
||||
+{
|
||||
+ struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info);
|
||||
+
|
||||
+ if (!htab->elf.sgot || !htab->elf.sgotplt)
|
||||
+ return TRUE;
|
||||
+
|
||||
+ if (htab->elf.sgot->output_section == htab->elf.sgotplt->output_section)
|
||||
+ {
|
||||
+ if (htab->elf.sgot->output_offset < htab->elf.sgotplt->output_offset)
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (htab->elf.sgot->output_section->vma
|
||||
+ <= htab->elf.sgotplt->output_section->vma)
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+/* Return the value of the _GLOBAL_OFFSET_TABLE_ symbol. */
|
||||
+
|
||||
+static inline bfd_vma
|
||||
+s390_got_pointer (struct bfd_link_info *info)
|
||||
+{
|
||||
+ struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info);
|
||||
+ bfd_vma got_pointer;
|
||||
+
|
||||
+ BFD_ASSERT (htab && htab->elf.hgot);
|
||||
+
|
||||
+ got_pointer = (htab->elf.hgot->root.u.def.section->output_section->vma
|
||||
+ + htab->elf.hgot->root.u.def.section->output_offset);
|
||||
+ /* Our ABI requires the GOT pointer to point at the very beginning
|
||||
+ of the global offset table. */
|
||||
+ BFD_ASSERT (got_pointer
|
||||
+ <= (htab->elf.sgot->output_section->vma
|
||||
+ + htab->elf.sgot->output_offset));
|
||||
+ BFD_ASSERT (got_pointer
|
||||
+ <= (htab->elf.sgotplt->output_section->vma
|
||||
+ + htab->elf.sgotplt->output_offset));
|
||||
+
|
||||
+ return got_pointer;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/* Return the offset of the .got versus _GLOBAL_OFFSET_TABLE_. */
|
||||
+
|
||||
+static inline bfd_vma
|
||||
+s390_got_offset (struct bfd_link_info *info)
|
||||
+{
|
||||
+ struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info);
|
||||
+
|
||||
+ /* The absolute address of the .got in the target image. */
|
||||
+ bfd_vma got_address = (htab->elf.sgot->output_section->vma
|
||||
+ + htab->elf.sgot->output_offset);
|
||||
+
|
||||
+ /* GOT offset must not be negative. */
|
||||
+ BFD_ASSERT (s390_got_pointer (info) <= got_address);
|
||||
+ return got_address - s390_got_pointer (info);
|
||||
+}
|
||||
+
|
||||
+/* Return the offset of the .got.plt versus _GLOBAL_OFFSET_TABLE_. */
|
||||
+
|
||||
+static inline bfd_vma
|
||||
+s390_gotplt_offset (struct bfd_link_info *info)
|
||||
+{
|
||||
+ struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info);
|
||||
+
|
||||
+ /* The absolute address of the .got.plt in the target image. */
|
||||
+ bfd_vma gotplt_address = (htab->elf.sgotplt->output_section->vma
|
||||
+ + htab->elf.sgotplt->output_offset);
|
||||
+
|
||||
+ /* GOT offset must not be negative. */
|
||||
+ BFD_ASSERT (s390_got_pointer (info) <= gotplt_address);
|
||||
+ return gotplt_address - s390_got_pointer (info);
|
||||
+}
|
||||
+
|
||||
/* Create sections needed by STT_GNU_IFUNC symbol. */
|
||||
|
||||
static bfd_boolean
|
||||
diff -rup binutils.orig/ld/emulparams/elf64_s390.sh binutils-2.31.1/ld/emulparams/elf64_s390.sh
|
||||
--- binutils.orig/ld/emulparams/elf64_s390.sh 2018-07-19 12:37:28.544025130 +0100
|
||||
+++ binutils-2.31.1/ld/emulparams/elf64_s390.sh 2018-07-19 12:38:11.235548717 +0100
|
||||
@@ -11,9 +11,12 @@ NOP=0x07070707
|
||||
TEMPLATE_NAME=elf32
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
GENERATE_PIE_SCRIPT=yes
|
||||
+GENERATE_RELRO_SCRIPT=yes
|
||||
NO_SMALL_DATA=yes
|
||||
EXTRA_EM_FILE=s390
|
||||
IREL_IN_PLT=
|
||||
+SEPARATE_GOTPLT=0
|
||||
+test -z "$RELRO" && unset SEPARATE_GOTPLT
|
||||
|
||||
# Treat a host that matches the target with the possible exception of "x"
|
||||
# in the name as if it were native.
|
||||
diff -rup binutils.orig/ld/emultempl/elf32.em binutils-2.31.1/ld/emultempl/elf32.em
|
||||
--- binutils.orig/ld/emultempl/elf32.em 2018-07-19 12:37:28.549025074 +0100
|
||||
+++ binutils-2.31.1/ld/emultempl/elf32.em 2018-07-19 12:37:39.041907980 +0100
|
||||
@@ -2376,17 +2376,41 @@ echo ' && link_info.combrelo
|
||||
echo ' && link_info.relro' >> e${EMULATION_NAME}.c
|
||||
echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xdceo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xdce >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xdco >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xdeo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
fi
|
||||
echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xde >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_pie (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xdo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (bfd_link_pie (&link_info)) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
|
||||
fi
|
||||
@@ -2402,17 +2426,41 @@ echo ' && link_info.combrelo
|
||||
echo ' && link_info.relro' >> e${EMULATION_NAME}.c
|
||||
echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xsceo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xsce >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xsco >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.combreloc) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xseo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
fi
|
||||
echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xse >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (bfd_link_dll (&link_info)' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xso >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (bfd_link_dll (&link_info)) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xs >> e${EMULATION_NAME}.c
|
||||
fi
|
||||
@@ -2425,14 +2473,34 @@ echo ' ; else if (link_info.combreloc'
|
||||
echo ' && link_info.relro' >> e${EMULATION_NAME}.c
|
||||
echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xceo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
echo ' && link_info.separate_code) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xce >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (link_info.combreloc' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xco >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c
|
||||
fi
|
||||
-echo ' ; else if (link_info.separate_code) return' >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (link_info.separate_code' >> e${EMULATION_NAME}.c
|
||||
+echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xeo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
+echo ' ; else if (link_info.separate_code) return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.xe >> e${EMULATION_NAME}.c
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+echo ' ; else if (link_info.relro) return' >> e${EMULATION_NAME}.c
|
||||
+sed $sc ldscripts/${EMULATION_NAME}.xo >> e${EMULATION_NAME}.c
|
||||
+fi
|
||||
echo ' ; else return' >> e${EMULATION_NAME}.c
|
||||
sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
|
||||
echo '; }' >> e${EMULATION_NAME}.c
|
||||
@@ -2471,6 +2539,21 @@ fragment <<EOF
|
||||
else
|
||||
return "ldscripts/${EMULATION_NAME}.xdw";
|
||||
}
|
||||
+EOF
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+fragment <<EOF
|
||||
+ else if (bfd_link_pie (&link_info)
|
||||
+ && link_info.combreloc
|
||||
+ && link_info.relro)
|
||||
+ {
|
||||
+ if (link_info.separate_code)
|
||||
+ return "ldscripts/${EMULATION_NAME}.xdceo";
|
||||
+ else
|
||||
+ return "ldscripts/${EMULATION_NAME}.xdco";
|
||||
+ }
|
||||
+EOF
|
||||
+fi
|
||||
+fragment <<EOF
|
||||
else if (bfd_link_pie (&link_info)
|
||||
&& link_info.combreloc)
|
||||
{
|
||||
@@ -2481,6 +2564,18 @@ fragment <<EOF
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+fragment <<EOF
|
||||
+ else if (bfd_link_pie (&link_info)
|
||||
+ && link_info.relro)
|
||||
+ {
|
||||
+ if (link_info.separate_code)
|
||||
+ return "ldscripts/${EMULATION_NAME}.xdeo";
|
||||
+ else
|
||||
+ return "ldscripts/${EMULATION_NAME}.xdo";
|
||||
+ }
|
||||
+EOF
|
||||
+fi
|
||||
fragment <<EOF
|
||||
else if (bfd_link_pie (&link_info))
|
||||
{
|
||||
@@ -2502,6 +2597,21 @@ fragment <<EOF
|
||||
else
|
||||
return "ldscripts/${EMULATION_NAME}.xsw";
|
||||
}
|
||||
+EOF
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+fragment <<EOF
|
||||
+ else if (bfd_link_dll (&link_info)
|
||||
+ && link_info.combreloc
|
||||
+ && link_info.relro)
|
||||
+ {
|
||||
+ if (link_info.separate_code)
|
||||
+ return "ldscripts/${EMULATION_NAME}.xsceo";
|
||||
+ else
|
||||
+ return "ldscripts/${EMULATION_NAME}.xsco";
|
||||
+ }
|
||||
+EOF
|
||||
+fi
|
||||
+fragment <<EOF
|
||||
else if (bfd_link_dll (&link_info) && link_info.combreloc)
|
||||
{
|
||||
if (link_info.separate_code)
|
||||
@@ -2511,6 +2621,18 @@ fragment <<EOF
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+fragment <<EOF
|
||||
+ else if (bfd_link_dll (&link_info)
|
||||
+ && link_info.relro)
|
||||
+ {
|
||||
+ if (link_info.separate_code)
|
||||
+ return "ldscripts/${EMULATION_NAME}.xseo";
|
||||
+ else
|
||||
+ return "ldscripts/${EMULATION_NAME}.xso";
|
||||
+ }
|
||||
+EOF
|
||||
+fi
|
||||
fragment <<EOF
|
||||
else if (bfd_link_dll (&link_info))
|
||||
{
|
||||
@@ -2531,6 +2653,20 @@ fragment <<EOF
|
||||
else
|
||||
return "ldscripts/${EMULATION_NAME}.xw";
|
||||
}
|
||||
+EOF
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+fragment <<EOF
|
||||
+ else if (link_info.combreloc
|
||||
+ && link_info.relro)
|
||||
+ {
|
||||
+ if (link_info.separate_code)
|
||||
+ return "ldscripts/${EMULATION_NAME}.xceo";
|
||||
+ else
|
||||
+ return "ldscripts/${EMULATION_NAME}.xco";
|
||||
+ }
|
||||
+EOF
|
||||
+fi
|
||||
+fragment <<EOF
|
||||
else if (link_info.combreloc)
|
||||
{
|
||||
if (link_info.separate_code)
|
||||
@@ -2540,6 +2676,17 @@ fragment <<EOF
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT" ; then
|
||||
+fragment <<EOF
|
||||
+ else if (link_info.relro)
|
||||
+ {
|
||||
+ if (link_info.separate_code)
|
||||
+ return "ldscripts/${EMULATION_NAME}.xeo";
|
||||
+ else
|
||||
+ return "ldscripts/${EMULATION_NAME}.xo";
|
||||
+ }
|
||||
+EOF
|
||||
+fi
|
||||
fragment <<EOF
|
||||
else
|
||||
{
|
||||
diff -rup binutils.orig/ld/genscripts.sh binutils-2.31.1/ld/genscripts.sh
|
||||
--- binutils.orig/ld/genscripts.sh 2018-07-19 12:37:28.540025175 +0100
|
||||
+++ binutils-2.31.1/ld/genscripts.sh 2018-07-19 12:37:39.041907980 +0100
|
||||
@@ -306,6 +306,20 @@ LD_FLAG=textonly
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xe
|
||||
|
||||
+if test -n "$GENERATE_RELRO_SCRIPT"; then
|
||||
+ LD_FLAG=
|
||||
+ RELRO=" "
|
||||
+ ( echo "/* Script for -z relo: generate normal executables with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xo
|
||||
+ LD_FLAG=textonly
|
||||
+ ( echo "/* Script for -z separate-code -z relo: generate normal executables with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xeo
|
||||
+ unset RELRO
|
||||
+fi
|
||||
LD_FLAG=n
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
|
||||
( echo "/* Script for -n: mix text and data on same page */"
|
||||
@@ -353,6 +367,25 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT";
|
||||
rm -f ${COMBRELOC}
|
||||
COMBRELOC=
|
||||
unset RELRO_NOW
|
||||
+ if test -n "$GENERATE_RELRO_SCRIPT"; then
|
||||
+ LD_FLAG=c
|
||||
+ RELRO=" "
|
||||
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xco.tmp
|
||||
+ ( echo "/* Script for -z combreloc -z relro: combine and sort reloc sections */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xco
|
||||
+ rm -f ${COMBRELOC}
|
||||
+ LD_FLAG=ctextonly
|
||||
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xceo.tmp
|
||||
+ ( echo "/* Script for -z combreloc -z separate-code -z relro: combine and sort reloc sections */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xceo
|
||||
+ rm -f ${COMBRELOC}
|
||||
+ COMBRELOC=
|
||||
+ unset RELRO
|
||||
+ fi
|
||||
fi
|
||||
|
||||
if test -n "$GENERATE_SHLIB_SCRIPT"; then
|
||||
@@ -370,6 +403,23 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; the
|
||||
. ${CUSTOMIZER_SCRIPT}
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xse
|
||||
+
|
||||
+ if test -n "$GENERATE_RELRO_SCRIPT"; then
|
||||
+ RELRO=" "
|
||||
+ LD_FLAG=shared
|
||||
+ (
|
||||
+ echo "/* Script for ld --shared -z relro: link shared library */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xso
|
||||
+ LD_FLAG=sharedtextonly
|
||||
+ (
|
||||
+ echo "/* Script for ld --shared -z relro -z separate-code: link shared library with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xseo
|
||||
+ unset RELRO
|
||||
+ fi
|
||||
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
|
||||
LD_FLAG=cshared
|
||||
@@ -401,8 +451,27 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; the
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xswe
|
||||
rm -f ${COMBRELOC}
|
||||
- COMBRELOC=
|
||||
unset RELRO_NOW
|
||||
+
|
||||
+ if test -n "$GENERATE_RELRO_SCRIPT"; then
|
||||
+ LD_FLAG=wshared
|
||||
+ RELRO=" "
|
||||
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsco.tmp
|
||||
+ ( echo "/* Script for --shared -z combreloc -z relro: shared library, combine & sort relocs with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsco
|
||||
+ rm -f ${COMBRELOC}
|
||||
+ LD_FLAG=wsharedtextonly
|
||||
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xsceo.tmp
|
||||
+ ( echo "/* Script for --shared -z combreloc -z relro -z separate-code: shared library, combine & sort relocs with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsceo
|
||||
+ rm -f ${COMBRELOC}
|
||||
+ unset RELRO
|
||||
+ fi
|
||||
+ COMBRELOC=
|
||||
fi
|
||||
unset CREATE_SHLIB
|
||||
fi
|
||||
@@ -422,6 +491,22 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
|
||||
. ${CUSTOMIZER_SCRIPT}
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xde
|
||||
+ if test -n "$GENERATE_RELRO_SCRIPT"; then
|
||||
+ RELRO=" "
|
||||
+ LD_FLAG=pie
|
||||
+ (
|
||||
+ echo "/* Script for ld -pie -z relro: link position independent executable */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdo
|
||||
+ LD_FLAG=pietextonly
|
||||
+ (
|
||||
+ echo "/* Script for ld -pie -z relro -z separate-code: link position independent executable with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdeo
|
||||
+ unset RELRO
|
||||
+ fi
|
||||
if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
|
||||
COMBRELOC=ldscripts/${EMULATION_NAME}.xdc.tmp
|
||||
@@ -453,8 +538,28 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdwe
|
||||
rm -f ${COMBRELOC}
|
||||
- COMBRELOC=
|
||||
unset RELRO_NOW
|
||||
+
|
||||
+ if test -n "$GENERATE_RELRO_SCRIPT"; then
|
||||
+ LD_FLAG=wpie
|
||||
+ RELRO=" "
|
||||
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdco.tmp
|
||||
+ ( echo "/* Script for -pie -z combreloc -z relro: position independent executable, combine & sort relocs with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdco
|
||||
+ rm -f ${COMBRELOC}
|
||||
+ LD_FLAG=wpietextonly
|
||||
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xdceo.tmp
|
||||
+ ( echo "/* Script for -pie -z combreloc -z relro -z separate-code: position independent executable, combine & sort relocs with separate code segment */"
|
||||
+ . ${CUSTOMIZER_SCRIPT}
|
||||
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdceo
|
||||
+ rm -f ${COMBRELOC}
|
||||
+
|
||||
+ unset RELRO
|
||||
+ fi
|
||||
+ COMBRELOC=
|
||||
fi
|
||||
unset CREATE_PIE
|
||||
fi
|
||||
Only in binutils.orig/ld/testsuite/ld-s390: gotreloc_64-1.dd
|
||||
Only in binutils-2.31.1/ld/testsuite/ld-s390: gotreloc_64-norelro-1.dd
|
||||
Only in binutils-2.31.1/ld/testsuite/ld-s390: gotreloc_64-relro-1.dd
|
||||
diff -rup binutils.orig/ld/testsuite/ld-s390/s390.exp binutils-2.31.1/ld/testsuite/ld-s390/s390.exp
|
||||
--- binutils.orig/ld/testsuite/ld-s390/s390.exp 2018-07-19 12:37:28.498025644 +0100
|
||||
+++ binutils-2.31.1/ld/testsuite/ld-s390/s390.exp 2018-07-19 12:38:11.236548705 +0100
|
||||
@@ -70,10 +70,15 @@ set s390xtests {
|
||||
{{readelf -WSsrl tlsbin_64.rd} {objdump -dzrj.text tlsbin_64.dd}
|
||||
{objdump -sj.got tlsbin_64.sd} {objdump -sj.tdata tlsbin_64.td}}
|
||||
"tlsbin_64"}
|
||||
- {"GOT: symbol address load from got to larl"
|
||||
- "-shared -melf64_s390 --hash-style=sysv --version-script=gotreloc-1.ver" ""
|
||||
+ {"GOT: norelro symbol address load from got to larl"
|
||||
+ "-shared -melf64_s390 -z norelro --hash-style=sysv --version-script=gotreloc-1.ver" ""
|
||||
"-m64" {gotreloc-1.s}
|
||||
- {{objdump -dzrj.text gotreloc_64-1.dd}}
|
||||
+ {{objdump -dzrj.text gotreloc_64-norelro-1.dd}}
|
||||
+ "gotreloc_64-1"}
|
||||
+ {"GOT: relro symbol address load from got to larl"
|
||||
+ "-shared -melf64_s390 -z relro --hash-style=sysv --version-script=gotreloc-1.ver" ""
|
||||
+ "-m64" {gotreloc-1.s}
|
||||
+ {{objdump -dzrj.text gotreloc_64-relro-1.dd}}
|
||||
"gotreloc_64-1"}
|
||||
{"PLT: offset test"
|
||||
"-shared -m elf64_s390 -dT pltoffset-1.ld" ""
|
||||
13
binutils-suppress-ld-align-tests.patch
Normal file
13
binutils-suppress-ld-align-tests.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- binutils.orig/ld/testsuite/ld-elf/linux-x86.exp 2024-01-24 11:52:35.288014542 +0000
|
||||
+++ binutils-2.41/ld/testsuite/ld-elf/linux-x86.exp 2024-01-24 17:31:39.356167357 +0000
|
||||
@@ -225,6 +225,10 @@ if { [check_ifunc_attribute_available] }
|
||||
# Old gcc silently ignores __attribute__ ((aligned())) with too big alignment.
|
||||
proc compiler_honours_aligned { } {
|
||||
global CC_FOR_TARGET READELF srcdir subdir
|
||||
+
|
||||
+ # Temporary fix for CentOS-10 kernel issue. (RHEL-22466)
|
||||
+ return 0
|
||||
+
|
||||
ld_compile $CC_FOR_TARGET $srcdir/$subdir/p_align-1.c tmpdir/p_align-1.o
|
||||
set output [run_host_cmd "$READELF" "-SW tmpdir/p_align-1.o"]
|
||||
if { [regexp { [.]data *PROGBITS .* 8388608[\n]} $output] } {
|
||||
1149
binutils-testsuite-fixes.patch
Normal file
1149
binutils-testsuite-fixes.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,10 @@
|
|||
--- binutils-2.26.orig/bfd/Makefile.am 2016-01-25 10:11:33.505289018 +0000
|
||||
+++ binutils-2.26/bfd/Makefile.am 2016-01-25 10:13:23.489964145 +0000
|
||||
@@ -1043,8 +1043,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
|
||||
diff -rup binutils.orig/bfd/Makefile.am binutils-2.38/bfd/Makefile.am
|
||||
--- binutils.orig/bfd/Makefile.am 2022-02-09 14:10:42.659300681 +0000
|
||||
+++ binutils-2.38/bfd/Makefile.am 2022-02-09 14:12:40.562532916 +0000
|
||||
@@ -977,8 +977,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
|
||||
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
|
||||
@echo "creating $@"
|
||||
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||
$(AM_V_GEN)\
|
||||
bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||
- bfd_version_string="\"$(VERSION)\"" ;\
|
||||
- bfd_soversion="$(VERSION)" ;\
|
||||
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
|
||||
|
|
@ -11,7 +12,7 @@
|
|||
bfd_version_package="\"$(PKGVERSION)\"" ;\
|
||||
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
|
||||
. $(srcdir)/development.sh ;\
|
||||
@@ -1055,7 +1055,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||
@@ -989,7 +989,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||
fi ;\
|
||||
$(SED) -e "s,@bfd_version@,$$bfd_version," \
|
||||
-e "s,@bfd_version_string@,$$bfd_version_string," \
|
||||
|
|
@ -20,12 +21,13 @@
|
|||
-e "s,@report_bugs_to@,$$report_bugs_to," \
|
||||
< $(srcdir)/version.h > $@; \
|
||||
echo "$${bfd_soversion}" > libtool-soversion
|
||||
--- binutils-2.26.orig/bfd/Makefile.in 2016-01-25 10:11:33.505289018 +0000
|
||||
+++ binutils-2.26/bfd/Makefile.in 2016-01-25 10:14:17.818297941 +0000
|
||||
@@ -2111,8 +2111,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
|
||||
diff -rup binutils.orig/bfd/Makefile.in binutils-2.38/bfd/Makefile.in
|
||||
--- binutils.orig/bfd/Makefile.in 2022-02-09 14:10:42.653300720 +0000
|
||||
+++ binutils-2.38/bfd/Makefile.in 2022-02-09 14:19:03.362040188 +0000
|
||||
@@ -2094,8 +2094,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(MKDOC
|
||||
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
|
||||
@echo "creating $@"
|
||||
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||
$(AM_V_GEN)\
|
||||
bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||
- bfd_version_string="\"$(VERSION)\"" ;\
|
||||
- bfd_soversion="$(VERSION)" ;\
|
||||
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
|
||||
|
|
@ -33,7 +35,7 @@
|
|||
bfd_version_package="\"$(PKGVERSION)\"" ;\
|
||||
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
|
||||
. $(srcdir)/development.sh ;\
|
||||
@@ -2123,7 +2123,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||
@@ -2106,7 +2106,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||
fi ;\
|
||||
$(SED) -e "s,@bfd_version@,$$bfd_version," \
|
||||
-e "s,@bfd_version_string@,$$bfd_version_string," \
|
||||
2698
binutils.spec
2698
binutils.spec
File diff suppressed because it is too large
Load diff
15
gating.yaml
Normal file
15
gating.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional}
|
||||
26
plans/build-gating.fmf
Normal file
26
plans/build-gating.fmf
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Build/PR gating tests for binutils
|
||||
#
|
||||
|
||||
/common:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/build-gating/common
|
||||
|
||||
/kernel-rebuild:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/build-gating/kernel-rebuild
|
||||
|
||||
adjust+:
|
||||
- because: "Plan to be ran when executed locally, or executed by CI system to gate a build or PR."
|
||||
# `commit` is used by Fedora CI, CentOS Stream CI, `build` by BaseOS CI
|
||||
when: >-
|
||||
trigger is defined
|
||||
and trigger != commit
|
||||
and trigger != build
|
||||
enabled: false
|
||||
18
plans/regression.fmf
Normal file
18
plans/regression.fmf
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Build/PR gating tests for binutils
|
||||
#
|
||||
|
||||
/common:
|
||||
plan:
|
||||
import:
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/regression
|
||||
|
||||
adjust+:
|
||||
- because: "Plan to be ran when executed locally, or executed by CI system after updating an erratum/bodhi update."
|
||||
# `build` is used by Bodhi
|
||||
when: >-
|
||||
trigger is defined
|
||||
and trigger != build
|
||||
enabled: false
|
||||
3
sources
3
sources
|
|
@ -1 +1,2 @@
|
|||
SHA512 (binutils-2.31.1.tar.xz) = 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30
|
||||
SHA512 (binutils-with-gold-2.47.50-48c933a69a8.tar.xz) = c4300e4881227c431c0bbbb949a5ee5bc113701f993766418b152df7d46d9df378ebace9efffcb6e1f0b7e72ad716bbcccf5b6aa55851dc28216555b242d18a0
|
||||
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue