Package: binutils / 2.31.1-16

branch-updates.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
# DP: updates from the binutils-2.31 branch

# git diff 0860693812fff944ab0602e72b762a4a2078da5b dba17838ab20a814e6c8ba51afe6962d1c400227

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5ec906aa8e..eb32e2dd67 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,8 +1,235 @@
+2019-03-18  Alan Modra  <amodra@gmail.com>
+
+	PR 24355
+	* elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
+	for local iplt syms with ent->plt.offset == -1.  Remove ineffective
+	attempt at writing glink stubs only once.
+
+2019-02-18  Nick Clifton  <nickc@redhat.com>
+
+	Import from the mainline:
+	2018-11-27  Mark Wielaard  <mark@klomp.org>
+
+	PR binutils/23919
+	* bfd.c (bfd_update_compression_header): Explicitly set alignment.
+	(bfd_check_compression_header): Add uncompressed_alignment_power
+	argument. Check ch_addralign is a power of 2.
+	* bfd-in2.h: Regenerated.
+	* compress.c (bfd_compress_section_contents): Get and set
+	orig_uncompressed_alignment_pow if section is decompressed.
+	(bfd_is_section_compressed_with_header): Add and get
+	uncompressed_align_pow_p argument.
+	(bfd_is_section_compressed): Add uncompressed_align_power argument
+	to bfd_is_section_compressed_with_header call.
+	(bfd_init_section_decompress_status): Get and set
+	uncompressed_alignment_power.
+	* elf.c (_bfd_elf_make_section_from_shdr): Add
+	uncompressed_align_power argument to
+	bfd_is_section_compressed_with_header call.
+
+	2018-11-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/23919
+	* compress.c (bfd_is_section_compressed_with_header): Initialize
+	* uncompressed_align_pow_p to 0.
+
+2019-02-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/24151
+	* elf64-x86-64.c (elf_x86_64_need_pic): Check
+	SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
+	(elf_x86_64_relocate_section): Move PIC check for PC-relative
+	relocations to ...
+	(elf_x86_64_check_relocs): Here.
+	(elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
+	to check if a symbol is defined in a non-shared object.
+	* elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
+
+2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+	PR ld/18841
+	* elf32-sparc.c (elf32_sparc_reloc_type_class): Return
+	reloc_class_ifunc for ifunc symbols.
+	* elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
+
+2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
+	<R_VISIUM_PC16>: Use explicit range test to detect an overflow.
+
+2018-12-12  Alan Modra  <amodra@gmail.com>
+
+	Apply from master
+	2018-10-20  Alan Modra  <amodra@gmail.com>
+	PR 23788
+	* elf.c (section_match): Don't require a size match for SHT_SYMTAB
+	or SHT_STRTAB.
+
+2018-12-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23929
+	* elf-properties.c (_bfd_elf_link_setup_gnu_properties): Don't
+	merge .note.gnu.property section in IR inputs.
+
+2018-11-30  Alan Modra  <amodra@gmail.com>
+
+	PR 23937
+	* elf64-ppc.c (write_plt_relocs_for_local_syms): Don't add local
+	entry offset for ifuncs.
+
+2018-11-27  Tamar Christina  <tamar.christina@arm.com>
+
+	Backport from mainline
+	PR ld/23904
+	* elfnn-aarch64.c (_bfd_aarch64_adrp_p): Use existing constants.
+	(_bfd_aarch64_erratum_843419_branch_to_stub): Use _bfd_aarch64_adrp_p.
+	(struct erratum_835769_branch_to_stub_clear_data): New.
+	(_bfd_aarch64_erratum_843419_clear_stub): New.
+	(clear_erratum_843419_entry): New.
+	(elfNN_aarch64_tls_relax): Use it.
+	(elfNN_aarch64_relocate_section): Pass input_section.
+	(aarch64_map_one_stub): Handle branch type none as valid.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-11-09  Cupertino Miranda  <cmiranda@synopsys.com>
+	* arc-got.h (arc_got_entry_type_for_reloc): Changed to
+	  correct static TLS relocs.
+	* elf32-arc.c (elf_arc_check_relocs): Introduced warning to
+	  TLS relocs which require -fPIC.
+	  (arc_create_forced_local_got_entries_for_tls): Created.
+	  Traverses list of GOT entries to be resolved statically
+	  when needed.
+	  (elf_arc_finish_dynamic_sections): Changed. Calls
+	  arc_create_forced_local_got_entries_for_tls for each known
+	  possibly GOT symbol.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-11-09  Claudiu Zissulescu  <claziss@synopsys.com>
+	* arc-got.h (arc_get_local_got_ents): Revamp it; use
+	elf_local_got_ents to store the local got list.
+	(get_got_entry_list_for_symbo): Restructure it.
+	* elf32-arc.c (elf_arc_relocate_section): Correct the call to
+	get_got_entry_list_for_symbol.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-09-06  Cupertino Miranda <cmiranda@synopsys.com>
+	* arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take
+	TLS section alignment in consideration for this relocation.
+	* elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
+	(ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-08-01  Cupertino Miranda <cmiranda@synopsys.com>
+	* arc-got.h (relocate_fix_got_relocs_for_got_info): Changed, fixed
+	TCB_SIZE offsize to include section alignment.
+	* elf32-arc.c (arc_special_overflow_checks): Likewise.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-03-02  Cupertino Miranda <cmiranda@synopsys.com>
+	* elf32-arc.c (elf_arc_check_relocs): Changed.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-03-02  Cupertino Miranda <cmiranda@synopsys.com>
+	* elf32-arc.c (elf_arc_check_relocs): Changed.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-03-02  Cupertino Miranda <cmiranda@synopsys.com>
+	* elf32-arc.c (elf_arc_finish_dynamic_symbol) Return FALSE in case
+	arc_htab is NULL.
+
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-03-02  Cupertino Miranda  <cmiranda@synopsys.com>a
+	* arc-got.h (get_got_entry_list_for_symbol): Changed.
+	* ef32-arc.c (struct elf_arc_link_hash_entry): Moved and changed.
+	(elf_arc_link_hash_newfunc): Changed.
+	(arc_elf_link_hash_table_create): Removed old initializations.
+	(elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
+
+2018-11-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23818
+	* elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
+	defined in discarded input sections.
+
+2018-09-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23499
+	* elf.c (_bfd_elf_get_symbol_version_string): Return
+	_("<corrupt>") for corrupt symbol version info.
+
+2018-09-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23499
+	* elflink.c (bfd_elf_record_link_assignment): Always clear
+	h->verinfo.verdef when overriding a dynamic definition.
+
+2018-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23428
+	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
+	add X86_ISA_1_NEEDED property only if existing properties won't
+	be removed.
+
+2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23486
+	* elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
+	GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
+	(_bfd_x86_elf_link_setup_gnu_properties): Adding the
+	GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
+	GNU_PROPERTY_X86_ISA_1_USED, property.
+
+2018-08-07  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
+	instruction of __tls_get_addr_opt stub.
+	(plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
+	dealing with __tls_get_addr_opt stub.
+	(build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
+
+2018-08-01  Alan Modra  <amodra@gmail.com>
+
+	* elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
+	(ppc_build_one_stub): Don't set stub_offset, instead assert that
+	it is sane.  Don't adjust stub_offset for alignment.  Adjust size
+	calculation.  Use "targ" temp when calculating offsets.
+	(ppc_size_one_stub): Set stub_offset here.  Use "targ" temp when
+	calculating offsets.  Adjust for alignment before setting
+	tls_get_addr_opt_bctrl.
+
+2018-07-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23428
+	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
+	separate code program header is needed, make sure that the first
+	read-only PT_LOAD segment has no code by adding a
+	GNU_PROPERTY_X86_ISA_1_USED note.
+
+2018-07-18  Nick Clifton  <nickc@redhat.com>
+
+	* development.sh: Set to true.
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
 	* version.m4: Set to 2.31.1
-	* development.sh: Set to true.
+	* development.sh: Set to false.
 	* configure: Regenerate.
 	* po/bfd.pot: Regenerate.
 
diff --git a/bfd/arc-got.h b/bfd/arc-got.h
index a86061bcb3..253578b90c 100644
--- a/bfd/arc-got.h
+++ b/bfd/arc-got.h
@@ -24,6 +24,9 @@
 
 #define TCB_SIZE (8)
 
+#define	align_power(addr, align)	\
+  (((addr) + ((bfd_vma) 1 << (align)) - 1) & (-((bfd_vma) 1 << (align))))
+
 enum tls_type_e
 {
   GOT_UNKNOWN = 0,
@@ -51,27 +54,26 @@ struct got_entry
   enum tls_got_entries existing_entries;
 };
 
+/* Return the local got list, if not defined, create an empty one.  */
+
 static struct got_entry **
 arc_get_local_got_ents (bfd * abfd)
 {
-  static struct got_entry **local_got_ents = NULL;
-
-  if (local_got_ents == NULL)
+  if (elf_local_got_ents (abfd) == NULL)
     {
-      size_t	   size;
-      Elf_Internal_Shdr *symtab_hdr = &((elf_tdata (abfd))->symtab_hdr);
-
-      size = symtab_hdr->sh_info * sizeof (bfd_vma);
-      local_got_ents = (struct got_entry **)
-	bfd_alloc (abfd, sizeof (struct got_entry *) * size);
-      if (local_got_ents == NULL)
-	return FALSE;
-
-      memset (local_got_ents, 0, sizeof (struct got_entry *) * size);
-      elf_local_got_ents (abfd) = local_got_ents;
+      bfd_size_type amt = (elf_tdata (abfd)->symtab_hdr.sh_info
+			   * sizeof (*elf_local_got_ents (abfd)));
+      elf_local_got_ents (abfd) = bfd_zmalloc (amt);
+      if (elf_local_got_ents (abfd) == NULL)
+	{
+	  _bfd_error_handler (_("%pB: cannot allocate memory for local "
+				"GOT entries"), abfd);
+	  bfd_set_error (bfd_error_bad_value);
+	  return NULL;
+	}
     }
 
-  return local_got_ents;
+  return elf_local_got_ents (abfd);
 }
 
 static struct got_entry *
@@ -156,15 +158,15 @@ get_got_entry_list_for_symbol (bfd *abfd,
 			       unsigned long r_symndx,
 			       struct elf_link_hash_entry *h)
 {
-  if (h != NULL)
+  struct elf_arc_link_hash_entry *h1 =
+    ((struct elf_arc_link_hash_entry *) h);
+  if (h1 != NULL)
     {
-      return &h->got.glist;
+      return &h1->got_ents;
     }
   else
     {
-      struct got_entry **local_got_ents
-	= arc_get_local_got_ents (abfd);
-      return &local_got_ents[r_symndx];
+      return arc_get_local_got_ents (abfd) + r_symndx;
     }
 }
 
@@ -206,7 +208,7 @@ arc_got_entry_type_for_reloc (reloc_howto_type *howto)
 		     __LINE__, name_for_global_symbol (H));		\
       }									\
     if (H)								\
-      if (h->dynindx == -1 && !h->forced_local)				\
+      if (H->dynindx == -1 && !H->forced_local)				\
 	if (! bfd_elf_link_record_dynamic_symbol (info, H))		\
 	  return FALSE;							\
      htab->s##SECNAME->size += 4;					\
@@ -282,6 +284,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry **	   list_p,
   BFD_ASSERT (entry);
 
   if (h == NULL
+      || h->forced_local == TRUE
       || (! elf_hash_table (info)->dynamic_sections_created
 	  || (bfd_link_pic (info)
 	      && SYMBOL_REFERENCES_LOCAL (info, h))))
@@ -329,23 +332,31 @@ relocate_fix_got_relocs_for_got_info (struct got_entry **	   list_p,
 		BFD_ASSERT (tls_sec && tls_sec->output_section);
 		bfd_vma sec_vma = tls_sec->output_section->vma;
 
-		bfd_put_32 (output_bfd,
-			    sym_value - sec_vma,
+		if (h == NULL || h->forced_local
+		   || !elf_hash_table (info)->dynamic_sections_created)
+		  {
+		    bfd_put_32 (output_bfd,
+			    sym_value - sec_vma
+			    + (elf_hash_table (info)->dynamic_sections_created
+			       ? 0
+			       : (align_power (0,
+					       tls_sec->alignment_power))),
 			    htab->sgot->contents + entry->offset
 			    + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
 			       ? 4 : 0));
 
-		ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
-			   "@ %lx, for symbol %s\n",
-			   (entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
-			    "GOT_TLS_IE"),
-			   (long) (sym_value - sec_vma),
-			   (long) (htab->sgot->output_section->vma
-			      + htab->sgot->output_offset->vma
-			      + entry->offset
-			      + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
-				 ? 4 : 0)),
-			   symbol_name);
+		    ARC_DEBUG ("arc_info: FIXED -> %s value = %#lx "
+			  "@ %lx, for symbol %s\n",
+			  (entry->type == GOT_TLS_GD ? "GOT_TLS_GD" :
+			   "GOT_TLS_IE"),
+			  (long) (sym_value - sec_vma),
+			  (long) (htab->sgot->output_section->vma
+			     + htab->sgot->output_offset
+			     + entry->offset
+			     + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
+				? 4 : 0)),
+			  symbol_name);
+		  }
 	      }
 	      break;
 
@@ -357,7 +368,10 @@ relocate_fix_got_relocs_for_got_info (struct got_entry **	   list_p,
 
 		bfd_put_32 (output_bfd,
 			    sym_value - sec_vma
-			    + (elf_hash_table (info)->dynamic_sections_created ? 0 : TCB_SIZE),
+			    + (elf_hash_table (info)->dynamic_sections_created
+			       ? 0
+			       : (align_power (TCB_SIZE,
+					       tls_sec->alignment_power))),
 			    htab->sgot->contents + entry->offset
 			    + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
 			       ? 4 : 0));
@@ -368,7 +382,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry **	   list_p,
 			    "GOT_TLS_IE"),
 			   (long) (sym_value - sec_vma),
 			   (long) (htab->sgot->output_section->vma
-			      + htab->sgot->output_offset->vma
+			      + htab->sgot->output_offset
 			      + entry->offset
 			      + (entry->existing_entries == TLS_GOT_MOD_AND_OFF
 				 ? 4 : 0)),
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index f53dbb5e8c..d0c2190d0b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -7279,7 +7279,8 @@ void bfd_update_compression_header
 
 bfd_boolean bfd_check_compression_header
    (bfd *abfd, bfd_byte *contents, asection *sec,
-    bfd_size_type *uncompressed_size);
+    bfd_size_type *uncompressed_size,
+    unsigned int *uncompressed_alignment_power);
 
 int bfd_get_compression_header_size (bfd *abfd, asection *sec);
 
@@ -7855,7 +7856,8 @@ void bfd_cache_section_contents
 bfd_boolean bfd_is_section_compressed_with_header
    (bfd *abfd, asection *section,
     int *compression_header_size_p,
-    bfd_size_type *uncompressed_size_p);
+    bfd_size_type *uncompressed_size_p,
+    unsigned int *uncompressed_alignment_power_p);
 
 bfd_boolean bfd_is_section_compressed
    (bfd *abfd, asection *section);
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 851710401e..b859d65e0e 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2332,6 +2332,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
 		  bfd_put_32 (abfd, sec->size, &echdr->ch_size);
 		  bfd_put_32 (abfd, 1 << sec->alignment_power,
 			      &echdr->ch_addralign);
+		  /* bfd_log2 (alignof (Elf32_Chdr)).  */
+		  bfd_set_section_alignment (abfd, sec, 2);
 		}
 	      else
 		{
@@ -2342,6 +2344,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
 		  bfd_put_64 (abfd, sec->size, &echdr->ch_size);
 		  bfd_put_64 (abfd, 1 << sec->alignment_power,
 			      &echdr->ch_addralign);
+		  /* bfd_log2 (alignof (Elf64_Chdr)).  */
+		  bfd_set_section_alignment (abfd, sec, 3);
 		}
 	    }
 	  else
@@ -2354,6 +2358,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
 		 order.  */
 	      memcpy (contents, "ZLIB", 4);
 	      bfd_putb64 (sec->size, contents + 4);
+	      /* No way to keep the original alignment, just use 1 always.  */
+	      bfd_set_section_alignment (abfd, sec, 0);
 	    }
 	}
     }
@@ -2368,12 +2374,15 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
    SYNOPSIS
 	bfd_boolean bfd_check_compression_header
 	  (bfd *abfd, bfd_byte *contents, asection *sec,
-	  bfd_size_type *uncompressed_size);
+          bfd_size_type *uncompressed_size,
+          unsigned int *uncompressed_alignment_power);
+
 
 DESCRIPTION
 	Check the compression header at CONTENTS of SEC in ABFD and
-	store the uncompressed size in UNCOMPRESSED_SIZE if the
-	compression header is valid.
+        store the uncompressed size in UNCOMPRESSED_SIZE and the
+        uncompressed data alignment in UNCOMPRESSED_ALIGNMENT_POWER
+        if the compression header is valid.
 
 RETURNS
 	Return TRUE if the compression header is valid.
@@ -2382,7 +2391,8 @@ RETURNS
 bfd_boolean
 bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
 			      asection *sec,
-			      bfd_size_type *uncompressed_size)
+			      bfd_size_type *uncompressed_size,
+			      unsigned int *uncompressed_alignment_power)
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
       && (elf_section_flags (sec) & SHF_COMPRESSED) != 0)
@@ -2404,9 +2414,10 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
 	  chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign);
 	}
       if (chdr.ch_type == ELFCOMPRESS_ZLIB
-	  && chdr.ch_addralign == 1U << sec->alignment_power)
+	  && chdr.ch_addralign == (1U << bfd_log2 (chdr.ch_addralign)))
 	{
 	  *uncompressed_size = chdr.ch_size;
+	  *uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign);
 	  return TRUE;
 	}
     }
diff --git a/bfd/compress.c b/bfd/compress.c
index 53e566e498..38803eb057 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -84,11 +84,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
   int zlib_size = 0;
   int orig_compression_header_size;
   bfd_size_type orig_uncompressed_size;
+  unsigned int orig_uncompressed_alignment_pow;
   int header_size = bfd_get_compression_header_size (abfd, NULL);
   bfd_boolean compressed
     = bfd_is_section_compressed_with_header (abfd, sec,
 					     &orig_compression_header_size,
-					     &orig_uncompressed_size);
+					     &orig_uncompressed_size,
+					     &orig_uncompressed_alignment_pow);
 
   /* Either ELF compression header or the 12-byte, "ZLIB" + 8-byte size,
      overhead in .zdebug* section.  */
@@ -153,6 +155,8 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
 	      return 0;
 	    }
 	  free (uncompressed_buffer);
+	  bfd_set_section_alignment (abfd, sec,
+				     orig_uncompressed_alignment_pow);
 	  sec->contents = buffer;
 	  sec->compress_status = COMPRESS_SECTION_DONE;
 	  return orig_uncompressed_size;
@@ -364,20 +368,25 @@ SYNOPSIS
 	bfd_boolean bfd_is_section_compressed_with_header
 	  (bfd *abfd, asection *section,
 	  int *compression_header_size_p,
-	  bfd_size_type *uncompressed_size_p);
+	  bfd_size_type *uncompressed_size_p,
+	  unsigned int *uncompressed_alignment_power_p);
+
 
 DESCRIPTION
 	Return @code{TRUE} if @var{section} is compressed.  Compression
-	header size is returned in @var{compression_header_size_p} and
-	uncompressed size is returned in @var{uncompressed_size_p}.  If
-	compression is unsupported, compression header size is returned
-	with -1 and uncompressed size is returned with 0.
+	header size is returned in @var{compression_header_size_p},
+        uncompressed size is returned in @var{uncompressed_size_p}
+        and the uncompressed data alignement power is returned in
+        @var{uncompressed_align_pow_p}.  If compression is
+        unsupported, compression header size is returned with -1
+        and uncompressed size is returned with 0.
 */
 
 bfd_boolean
 bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
 				       int *compression_header_size_p,
-				       bfd_size_type *uncompressed_size_p)
+				       bfd_size_type *uncompressed_size_p,
+				       unsigned int *uncompressed_align_pow_p)
 {
   bfd_byte header[MAX_COMPRESSION_HEADER_SIZE];
   int compression_header_size;
@@ -385,6 +394,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
   unsigned int saved = sec->compress_status;
   bfd_boolean compressed;
 
+  *uncompressed_align_pow_p = 0;
+
   compression_header_size = bfd_get_compression_header_size (abfd, sec);
   if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
     abort ();
@@ -412,7 +423,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
       if (compression_header_size != 0)
 	{
 	  if (!bfd_check_compression_header (abfd, header, sec,
-					     uncompressed_size_p))
+					     uncompressed_size_p,
+					     uncompressed_align_pow_p))
 	    compression_header_size = -1;
 	}
       /* Check for the pathalogical case of a debug string section that
@@ -449,9 +461,11 @@ bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
 {
   int compression_header_size;
   bfd_size_type uncompressed_size;
+  unsigned int uncompressed_align_power;
   return (bfd_is_section_compressed_with_header (abfd, sec,
 						 &compression_header_size,
-						 &uncompressed_size)
+						 &uncompressed_size,
+						 &uncompressed_align_power)
 	  && compression_header_size >= 0
 	  && uncompressed_size > 0);
 }
@@ -480,6 +494,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
   int compression_header_size;
   int header_size;
   bfd_size_type uncompressed_size;
+  unsigned int uncompressed_alignment_power = 0;
 
   compression_header_size = bfd_get_compression_header_size (abfd, sec);
   if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
@@ -508,7 +523,8 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
       uncompressed_size = bfd_getb64 (header + 4);
     }
   else if (!bfd_check_compression_header (abfd, header, sec,
-					 &uncompressed_size))
+					  &uncompressed_size,
+					  &uncompressed_alignment_power))
     {
       bfd_set_error (bfd_error_wrong_format);
       return FALSE;
@@ -516,6 +532,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
 
   sec->compressed_size = sec->size;
   sec->size = uncompressed_size;
+  bfd_set_section_alignment (abfd, sec, uncompressed_alignment_power);
   sec->compress_status = DECOMPRESS_SECTION_SIZED;
 
   return TRUE;
diff --git a/bfd/development.sh b/bfd/development.sh
index 918150f30b..27a7150e6d 100644
--- a/bfd/development.sh
+++ b/bfd/development.sh
@@ -16,4 +16,4 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Controls whether to enable development-mode features by default.
-development=false
+development=true
diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c
index 50c0e9d703..944e1744a8 100644
--- a/bfd/elf-properties.c
+++ b/bfd/elf-properties.c
@@ -350,7 +350,8 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info)
 
   /* Merge .note.gnu.property sections.  */
   for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
-    if (abfd != first_pbfd && (abfd->flags & DYNAMIC) == 0)
+    if (abfd != first_pbfd
+	&& (abfd->flags & (DYNAMIC | BFD_PLUGIN)) == 0)
       {
 	elf_property_list *null_ptr = NULL;
 	elf_property_list **listp = &null_ptr;
diff --git a/bfd/elf.c b/bfd/elf.c
index 0f75375128..dfeedf91c7 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1177,10 +1177,12 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
       enum { nothing, compress, decompress } action = nothing;
       int compression_header_size;
       bfd_size_type uncompressed_size;
+      unsigned int uncompressed_align_power;
       bfd_boolean compressed
 	= bfd_is_section_compressed_with_header (abfd, newsect,
 						 &compression_header_size,
-						 &uncompressed_size);
+						 &uncompressed_size,
+						 &uncompressed_align_power);
 
       if (compressed)
 	{
@@ -1299,15 +1301,15 @@ static bfd_boolean
 section_match (const Elf_Internal_Shdr * a,
 	       const Elf_Internal_Shdr * b)
 {
-  return
-    a->sh_type	       == b->sh_type
-    && (a->sh_flags & ~ SHF_INFO_LINK)
-    == (b->sh_flags & ~ SHF_INFO_LINK)
-    && a->sh_addralign == b->sh_addralign
-    && a->sh_size      == b->sh_size
-    && a->sh_entsize   == b->sh_entsize
-    /* FIXME: Check sh_addr ?  */
-    ;
+  if (a->sh_type != b->sh_type
+      || ((a->sh_flags ^ b->sh_flags) & ~SHF_INFO_LINK) != 0
+      || a->sh_addralign != b->sh_addralign
+      || a->sh_entsize != b->sh_entsize)
+    return FALSE;
+  if (a->sh_type == SHT_SYMTAB
+      || a->sh_type == SHT_STRTAB)
+    return TRUE;
+  return a->sh_size == b->sh_size;
 }
 
 /* Find a section in OBFD that has the same characteristics
@@ -1877,7 +1879,7 @@ _bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol,
 	{
 	  Elf_Internal_Verneed *t;
 
-	  version_string = "";
+	  version_string = _("<corrupt>");
 	  for (t = elf_tdata (abfd)->verref;
 	       t != NULL;
 	       t = t->vn_nextref)
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index a48ef0ca15..495fa342d3 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -160,6 +160,18 @@ struct arc_relocation_data
   const char *    symbol_name;
 };
 
+/* ARC ELF linker hash entry.  */
+struct elf_arc_link_hash_entry
+{
+  struct elf_link_hash_entry root;
+
+  /* Track dynamic relocs copied for this symbol.  */
+  struct elf_dyn_relocs *dyn_relocs;
+
+  struct got_entry *got_ents;
+};
+
+
 /* Should be included at this location due to static declarations
    defined before this point.  */
 #include "arc-got.h"
@@ -281,15 +293,6 @@ struct arc_reloc_map
   unsigned char		    elf_reloc_val;
 };
 
-/* ARC ELF linker hash entry.  */
-struct elf_arc_link_hash_entry
-{
-  struct elf_link_hash_entry root;
-
-  /* Track dynamic relocs copied for this symbol.  */
-  struct elf_dyn_relocs *dyn_relocs;
-};
-
 /* ARC ELF linker hash table.  */
 struct elf_arc_link_hash_table
 {
@@ -301,28 +304,28 @@ elf_arc_link_hash_newfunc (struct bfd_hash_entry *entry,
 			   struct bfd_hash_table *table,
 			   const char *string)
 {
+  struct elf_arc_link_hash_entry * ret =
+    (struct elf_arc_link_hash_entry *) entry;
+
   /* Allocate the structure if it has not already been allocated by a
      subclass.  */
-  if (entry == NULL)
-    {
-      entry = (struct bfd_hash_entry *)
-	  bfd_hash_allocate (table,
-			     sizeof (struct elf_arc_link_hash_entry));
-      if (entry == NULL)
-	return entry;
-    }
+  if (ret == NULL)
+    ret = (struct elf_arc_link_hash_entry *)
+	bfd_hash_allocate (table, sizeof (struct elf_arc_link_hash_entry));
+  if (ret == NULL)
+    return (struct bfd_hash_entry *) ret;
 
   /* Call the allocation method of the superclass.  */
-  entry = _bfd_elf_link_hash_newfunc (entry, table, string);
-  if (entry != NULL)
+  ret = ((struct elf_arc_link_hash_entry *)
+	 _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+				     table, string));
+  if (ret != NULL)
     {
-      struct elf_arc_link_hash_entry *eh;
-
-      eh = (struct elf_arc_link_hash_entry *) entry;
-      eh->dyn_relocs = NULL;
+      ret->dyn_relocs = NULL;
+      ret->got_ents = NULL;
     }
 
-  return entry;
+  return (struct bfd_hash_entry *) ret;
 }
 
 /* Destroy an ARC ELF linker hash table.  */
@@ -352,11 +355,6 @@ arc_elf_link_hash_table_create (bfd *abfd)
       return NULL;
     }
 
-  ret->elf.init_got_refcount.refcount = 0;
-  ret->elf.init_got_refcount.glist = NULL;
-  ret->elf.init_got_offset.offset = 0;
-  ret->elf.init_got_offset.glist = NULL;
-
   ret->elf.root.hash_table_free = elf_arc_link_hash_table_free;
 
   return &ret->elf.root;
@@ -1200,11 +1198,14 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
 	     + (reloc_data.reloc_offset))))
 #define SECTSTART (bfd_signed_vma) (reloc_data.sym_section->output_section->vma \
 				    + reloc_data.sym_section->output_offset)
+#define FINAL_SECTSTART \
+  (bfd_signed_vma) (reloc_data.sym_section->output_section->vma)
 #define JLI (bfd_signed_vma) (reloc_data.sym_section->output_section->vma)
 #define _SDA_BASE_ (bfd_signed_vma) (reloc_data.sdata_begin_symbol_vma)
 #define TLS_REL (bfd_signed_vma) \
   ((elf_hash_table (info))->tls_sec->output_section->vma)
-#define TLS_TBSS (8)
+#define TLS_TBSS (align_power(TCB_SIZE, \
+		  reloc_data.sym_section->alignment_power))
 
 #define none (0)
 
@@ -1615,10 +1616,14 @@ elf_arc_relocate_section (bfd *			  output_bfd,
 	  while (h->root.type == bfd_link_hash_indirect
 		 || h->root.type == bfd_link_hash_warning)
 	  {
-	    struct elf_link_hash_entry *h_old = h;
+	    struct elf_arc_link_hash_entry *ah_old =
+	      (struct elf_arc_link_hash_entry *) h;
 	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-	    if (h->got.glist == 0 && h_old->got.glist != h->got.glist)
-	      h->got.glist = h_old->got.glist;
+	    struct elf_arc_link_hash_entry *ah =
+	      (struct elf_arc_link_hash_entry *) h;
+
+	    if (ah->got_ents == 0 && ah_old->got_ents != ah->got_ents)
+	      ah->got_ents = ah_old->got_ents;
 	  }
 
 	  /* TODO: Need to validate what was the intention.  */
@@ -1636,6 +1641,8 @@ elf_arc_relocate_section (bfd *			  output_bfd,
 
 	      if (is_reloc_for_GOT (howto) && !bfd_link_pic (info))
 		{
+		  struct elf_arc_link_hash_entry *ah =
+		    (struct elf_arc_link_hash_entry *) h;
 		  /* TODO: Change it to use arc_do_relocation with
 		    ARC_32 reloc.  Try to use ADD_RELA macro.  */
 		  bfd_vma relocation =
@@ -1645,8 +1652,8 @@ elf_arc_relocate_section (bfd *			  output_bfd,
 			 + reloc_data.sym_section->output_section->vma)
 		      : 0);
 
-		  BFD_ASSERT (h->got.glist);
-		  bfd_vma got_offset = h->got.glist->offset;
+		  BFD_ASSERT (ah->got_ents);
+		  bfd_vma got_offset = ah->got_ents->offset;
 		  bfd_put_32 (output_bfd, relocation,
 			      htab->sgot->contents + got_offset);
 		}
@@ -1717,7 +1724,7 @@ elf_arc_relocate_section (bfd *			  output_bfd,
 	  reloc_data.should_relocate = TRUE;
 
 	  struct got_entry **list
-	    = get_got_entry_list_for_symbol (output_bfd, r_symndx, h);
+	    = get_got_entry_list_for_symbol (input_bfd, r_symndx, h);
 
 	  reloc_data.got_offset_value
 	    = relocate_fix_got_relocs_for_got_info (list,
@@ -1956,40 +1963,45 @@ elf_arc_check_relocs (bfd *			 abfd,
       if (r_symndx < symtab_hdr->sh_info) /* Is a local symbol.  */
 	h = NULL;
       else /* Global one.  */
-	h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+	{
+	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+	  while (h->root.type == bfd_link_hash_indirect
+		 || h->root.type == bfd_link_hash_warning)
+	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
+	}
+
 
       switch (r_type)
 	{
-	  case R_ARC_32:
-	  case R_ARC_32_ME:
-	    /* During shared library creation, these relocs should not
-	       appear in a shared library (as memory will be read only
-	       and the dynamic linker can not resolve these.  However
-	       the error should not occur for e.g. debugging or
-	       non-readonly sections.  */
-	    if (h != NULL
-		&& (bfd_link_dll (info) && !bfd_link_pie (info))
-		&& (sec->flags & SEC_ALLOC) != 0
-		&& (sec->flags & SEC_READONLY) != 0
-		&& ((sec->flags & SEC_CODE) != 0
-		    || (sec->flags & SEC_DEBUGGING) != 0))
-	      {
-		const char *name;
-		if (h)
-		  name = h->root.root.string;
-		else
-		  /* bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);  */
-		  name = "UNKNOWN";
-		_bfd_error_handler
-		  /* xgettext:c-format */
-		  (_("%pB: relocation %s against `%s' can not be used"
-		     " when making a shared object; recompile with -fPIC"),
-		   abfd,
-		   arc_elf_howto (r_type)->name,
-		   name);
-		bfd_set_error (bfd_error_bad_value);
-		return FALSE;
-	      }
+	case R_ARC_32:
+	case R_ARC_32_ME:
+	  /* During shared library creation, these relocs should not
+	     appear in a shared library (as memory will be read only
+	     and the dynamic linker can not resolve these.  However
+	     the error should not occur for e.g. debugging or
+	     non-readonly sections.  */
+	  if (h != NULL
+	      && (bfd_link_dll (info) && !bfd_link_pie (info))
+	      && (sec->flags & SEC_ALLOC) != 0
+	      && (sec->flags & SEC_READONLY) != 0
+	      && ((sec->flags & SEC_CODE) != 0
+		  || (sec->flags & SEC_DEBUGGING) != 0))
+	    {
+	      const char *name;
+	      if (h)
+		name = h->root.root.string;
+	      else
+		name = "UNKNOWN";
+	      _bfd_error_handler
+	      /* xgettext:c-format */
+	      (_("%pB: relocation %s against `%s' can not be used"
+		 " when making a shared object; recompile with -fPIC"),
+		 abfd,
+		 arc_elf_howto (r_type)->name,
+		 name);
+	      bfd_set_error (bfd_error_bad_value);
+	      return FALSE;
+	    }
 
 	    /* In some cases we are not setting the 'non_got_ref'
 	       flag, even though the relocations don't require a GOT
@@ -2031,13 +2043,33 @@ elf_arc_check_relocs (bfd *			 abfd,
 	  if (h == NULL)
 	    continue;
 	  else
-	    h->needs_plt = 1;
+	    if (h->forced_local == 0)
+	      h->needs_plt = 1;
 	}
 
       /* Add info to the symbol got_entry_list.  */
       if (is_reloc_for_GOT (howto)
 	  || is_reloc_for_TLS (howto))
 	{
+	  if (bfd_link_dll (info) && !bfd_link_pie (info)
+	      && (r_type == R_ARC_TLS_LE_32 || r_type == R_ARC_TLS_LE_S9))
+	    {
+	      const char *name;
+	      if (h)
+		name = h->root.root.string;
+	      else
+		/* bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);  */
+		name = "UNKNOWN";
+	      _bfd_error_handler
+		/* xgettext:c-format */
+		(_("%pB: relocation %s against `%s' can not be used"
+		   " when making a shared object; recompile with -fPIC"),
+		   abfd,
+		   arc_elf_howto (r_type)->name,
+		   name);
+	      bfd_set_error (bfd_error_bad_value);
+	      return FALSE;
+	    }
 	  if (! _bfd_elf_create_got_section (dynobj, info))
 	    return FALSE;
 
@@ -2404,7 +2436,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
      create respective dynamic relocs.  */
   /* TODO: Make function to get list and not access the list directly.  */
   /* TODO: Move function to relocate_section create this relocs eagerly.  */
-  create_got_dynrelocs_for_got_info (&h->got.glist,
+  struct elf_arc_link_hash_entry *ah =
+    (struct elf_arc_link_hash_entry *) h;
+  create_got_dynrelocs_for_got_info (&ah->got_ents,
 				     output_bfd,
 				     info,
 				     h);
@@ -2413,6 +2447,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
     {
       struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info);
 
+      if (arc_htab == NULL)
+	return FALSE;
+
       if (h->dynindx == -1
 	  || (h->root.type != bfd_link_hash_defined
 	      && h->root.type != bfd_link_hash_defweak)
@@ -2455,6 +2492,39 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd,
     s = bfd_get_linker_section (dynobj, SECTION);		\
   break;
 
+
+struct obfd_info_group {
+  bfd *output_bfd;
+  struct bfd_link_info *info;
+};
+
+static bfd_boolean
+arc_create_forced_local_got_entries_for_tls (struct bfd_hash_entry *bh,
+					     void *data)
+{
+  struct elf_arc_link_hash_entry * h =
+    (struct elf_arc_link_hash_entry *) bh;
+  struct obfd_info_group *tmp = (struct obfd_info_group *) data;
+
+  if (h->got_ents != NULL)
+    {
+      BFD_ASSERT (h);
+
+      struct got_entry *list = h->got_ents;
+
+      while (list != NULL)
+	{
+	  create_got_dynrelocs_for_single_entry (list, tmp->output_bfd,
+	    tmp->info,
+	    (struct elf_link_hash_entry *) h);
+	  list = list->next;
+	}
+    }
+
+  return TRUE;
+}
+
+
 /* Function :  elf_arc_finish_dynamic_sections
    Brief    :  Finish up the dynamic sections handling.
    Args     :  output_bfd :
@@ -2588,6 +2658,12 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd,
 	}
     }
 
+  struct obfd_info_group group;
+  group.output_bfd = output_bfd;
+  group.info = info;
+  bfd_hash_traverse (&info->hash->table,
+		     arc_create_forced_local_got_entries_for_tls, &group);
+
   return TRUE;
 }
 
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 5e9251bdb9..f4a329a132 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -10828,6 +10828,7 @@ ppc_finish_symbols (struct bfd_link_info *info)
 		bfd_byte *loc;
 		bfd_vma val;
 		Elf_Internal_Rela rela;
+		unsigned char *p;
 
 		if (!get_sym_h (NULL, &sym, &sym_sec, NULL, &local_syms,
 				lplt - local_plt, ibfd))
@@ -10872,14 +10873,9 @@ ppc_finish_symbols (struct bfd_link_info *info)
 		loc = relplt->contents + (relplt->reloc_count++
 					  * sizeof (Elf32_External_Rela));
 		bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc);
-	      }
-	    if ((ent->glink_offset & 1) == 0)
-	      {
-		unsigned char *p = ((unsigned char *) htab->glink->contents
-				    + ent->glink_offset);
 
+		p = (unsigned char *) htab->glink->contents + ent->glink_offset;
 		write_glink_stub (NULL, ent, htab->elf.iplt, p, info);
-		ent->glink_offset |= 1;
 	      }
 	  }
 
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 4378b6177c..80e807f862 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -157,13 +157,44 @@ elf32_sparc_final_write_processing (bfd *abfd,
     }
 }
 
+/* Used to decide how to sort relocs in an optimal manner for the
+   dynamic linker, before writing them out.  */
+
 static enum elf_reloc_type_class
-elf32_sparc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+elf32_sparc_reloc_type_class (const struct bfd_link_info *info,
 			      const asection *rel_sec ATTRIBUTE_UNUSED,
 			      const Elf_Internal_Rela *rela)
 {
+  bfd *abfd = info->output_bfd;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct _bfd_sparc_elf_link_hash_table *htab
+    = _bfd_sparc_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (htab->elf.dynsym != NULL
+      && htab->elf.dynsym->contents != NULL)
+    {
+      /* Check relocation against STT_GNU_IFUNC symbol if there are
+	 dynamic symbols.  */
+      unsigned long r_symndx = htab->r_symndx (rela->r_info);
+      if (r_symndx != STN_UNDEF)
+	{
+	  Elf_Internal_Sym sym;
+	  if (!bed->s->swap_symbol_in (abfd,
+				       (htab->elf.dynsym->contents
+					+ r_symndx * bed->s->sizeof_sym),
+				       0, &sym))
+	    abort ();
+
+	  if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC)
+	    return reloc_class_ifunc;
+	}
+    }
+
   switch ((int) ELF32_R_TYPE (rela->r_info))
     {
+    case R_SPARC_IRELATIVE:
+      return reloc_class_ifunc;
     case R_SPARC_RELATIVE:
       return reloc_class_relative;
     case R_SPARC_JMP_SLOT:
diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c
index e8f1c4c9e4..2846140e4c 100644
--- a/bfd/elf32-visium.c
+++ b/bfd/elf32-visium.c
@@ -312,7 +312,6 @@ visium_elf_howto_parity_reloc (bfd * input_bfd, arelent *reloc_entry,
   bfd_vma relocation;
   bfd_byte *inplace_address;
   bfd_vma insn;
-  const bfd_vma signmask = 0xffff8000;
 
   /* This part is from bfd_elf_generic_reloc.
      If we're relocating, and this an external symbol, we don't want
@@ -351,19 +350,19 @@ visium_elf_howto_parity_reloc (bfd * input_bfd, arelent *reloc_entry,
 
   if (reloc_entry->howto->pc_relative)
     {
-      relocation -= input_section->output_section->vma
-	+ input_section->output_offset;
+      relocation -= input_section->output_section->vma;
+      relocation -= input_section->output_offset;
       relocation -= reloc_entry->address;
     }
 
   switch (reloc_entry->howto->type)
     {
     case R_VISIUM_PC16:
-      relocation >>= 2;
-      if (ret == bfd_reloc_ok && (relocation & signmask) != 0
-	  && (relocation & signmask) != signmask)
+      if (ret == bfd_reloc_ok
+	  && ((bfd_signed_vma) relocation < -0x20000
+	      || (bfd_signed_vma) relocation > 0x1ffff))
 	ret = bfd_reloc_overflow;
-      relocation &= 0xffff;
+      relocation = (relocation >> 2) & 0xffff;
       break;
     case R_VISIUM_HI16:
     case R_VISIUM_HI16_PCREL:
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 45d81777eb..746506ef09 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -10810,8 +10810,7 @@ plt_stub_size (struct ppc_link_hash_table *htab,
       && htab->params->tls_get_addr_opt)
     {
       size += 7 * 4;
-      if (ALWAYS_EMIT_R2SAVE
-	  || stub_entry->stub_type == ppc_stub_plt_call_r2save)
+      if (stub_entry->stub_type == ppc_stub_plt_call_r2save)
 	size += 6 * 4;
     }
   return size;
@@ -10829,7 +10828,7 @@ plt_stub_pad (struct ppc_link_hash_table *htab,
 	      bfd_vma plt_off)
 {
   int stub_align;
-  unsigned stub_size = plt_stub_size (htab, stub_entry, plt_off);
+  unsigned stub_size;
   bfd_vma stub_off = stub_entry->group->stub_sec->size;
 
   if (htab->params->plt_stub_align >= 0)
@@ -10841,6 +10840,7 @@ plt_stub_pad (struct ppc_link_hash_table *htab,
     }
 
   stub_align = 1 << -htab->params->plt_stub_align;
+  stub_size = plt_stub_size (htab, stub_entry, plt_off);
   if (((stub_off + stub_size - 1) & -stub_align) - (stub_off & -stub_align)
       > ((stub_size - 1) & -stub_align))
     return stub_align - (stub_off & (stub_align - 1));
@@ -11055,8 +11055,7 @@ build_tls_get_addr_stub (struct ppc_link_hash_table *htab,
   bfd_put_32 (obfd, MR_R3_R0, p),		p += 4;
   if (r != NULL)
     r[0].r_offset += 7 * 4;
-  if (!ALWAYS_EMIT_R2SAVE
-      && stub_entry->stub_type != ppc_stub_plt_call_r2save)
+  if (stub_entry->stub_type != ppc_stub_plt_call_r2save)
     return build_plt_stub (htab, stub_entry, p, offset, r);
 
   bfd_put_32 (obfd, MFLR_R11, p),		p += 4;
@@ -11148,7 +11147,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
   struct ppc_link_hash_table *htab;
   bfd_byte *loc;
   bfd_byte *p;
-  bfd_vma dest, off;
+  bfd_vma targ, off;
   Elf_Internal_Rela *r;
   asection *plt;
 
@@ -11160,8 +11159,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
   if (htab == NULL)
     return FALSE;
 
-  /* Make a note of the offset within the stubs for this entry.  */
-  stub_entry->stub_offset = stub_entry->group->stub_sec->size;
+  BFD_ASSERT (stub_entry->stub_offset >= stub_entry->group->stub_sec->size);
   loc = stub_entry->group->stub_sec->contents + stub_entry->stub_offset;
 
   htab->stub_count[stub_entry->stub_type - 1] += 1;
@@ -11170,16 +11168,16 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
     case ppc_stub_long_branch:
     case ppc_stub_long_branch_r2off:
       /* Branches are relative.  This is where we are going to.  */
-      dest = (stub_entry->target_value
+      targ = (stub_entry->target_value
 	      + stub_entry->target_section->output_offset
 	      + stub_entry->target_section->output_section->vma);
-      dest += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
-      off = dest;
+      targ += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
 
       /* And this is where we are coming from.  */
-      off -= (stub_entry->stub_offset
-	      + stub_entry->group->stub_sec->output_offset
-	      + stub_entry->group->stub_sec->output_section->vma);
+      off = (stub_entry->stub_offset
+	     + stub_entry->group->stub_sec->output_offset
+	     + stub_entry->group->stub_sec->output_section->vma);
+      off = targ - off;
 
       p = loc;
       if (stub_entry->stub_type == ppc_stub_long_branch_r2off)
@@ -11226,7 +11224,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	    return FALSE;
 	  r->r_offset = p - 4 - stub_entry->group->stub_sec->contents;
 	  r->r_info = ELF64_R_INFO (0, R_PPC64_REL24);
-	  r->r_addend = dest;
+	  r->r_addend = targ;
 	  if (stub_entry->h != NULL)
 	    {
 	      struct elf_link_hash_entry **hashes;
@@ -11278,13 +11276,13 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  return FALSE;
 	}
 
-      dest = (stub_entry->target_value
+      targ = (stub_entry->target_value
 	      + stub_entry->target_section->output_offset
 	      + stub_entry->target_section->output_section->vma);
       if (stub_entry->stub_type != ppc_stub_plt_branch_r2off)
-	dest += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
+	targ += PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
 
-      bfd_put_64 (htab->brlt->owner, dest,
+      bfd_put_64 (htab->brlt->owner, targ,
 		  htab->brlt->contents + br_entry->offset);
 
       if (br_entry->iter == htab->stub_iteration)
@@ -11301,7 +11299,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 			       + htab->brlt->output_offset
 			       + htab->brlt->output_section->vma);
 	      rela.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
-	      rela.r_addend = dest;
+	      rela.r_addend = targ;
 
 	      rl = htab->relbrlt->contents;
 	      rl += (htab->relbrlt->reloc_count++
@@ -11321,17 +11319,17 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 			     + htab->brlt->output_offset
 			     + htab->brlt->output_section->vma);
 	      r->r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
-	      r->r_addend = dest;
+	      r->r_addend = targ;
 	    }
 	}
 
-      dest = (br_entry->offset
+      targ = (br_entry->offset
 	      + htab->brlt->output_offset
 	      + htab->brlt->output_section->vma);
 
-      off = (dest
-	     - elf_gp (info->output_bfd)
-	     - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+      off = (elf_gp (info->output_bfd)
+	     + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+      off = targ - off;
 
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
 	{
@@ -11354,7 +11352,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  if (stub_entry->stub_type == ppc_stub_plt_branch_r2off)
 	    r[0].r_offset += 4;
 	  r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_DS);
-	  r[0].r_addend = dest;
+	  r[0].r_addend = targ;
 	  if (PPC_HA (off) != 0)
 	    {
 	      r[0].r_info = ELF64_R_INFO (0, R_PPC64_TOC16_HA);
@@ -11439,8 +11437,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	}
 
       /* Now build the stub.  */
-      dest = stub_entry->plt_ent->plt.offset & ~1;
-      if (dest >= (bfd_vma) -2)
+      targ = stub_entry->plt_ent->plt.offset & ~1;
+      if (targ >= (bfd_vma) -2)
 	abort ();
 
       plt = htab->elf.splt;
@@ -11453,12 +11451,11 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  else
 	    plt = htab->pltlocal;
 	}
+      targ += plt->output_offset + plt->output_section->vma;
 
-      dest += plt->output_offset + plt->output_section->vma;
-
-      off = (dest
-	     - elf_gp (info->output_bfd)
-	     - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+      off = (elf_gp (info->output_bfd)
+	     + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+      off = targ - off;
 
       if (off + 0x80008000 > 0xffffffff || (off & 7) != 0)
 	{
@@ -11473,15 +11470,6 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  return FALSE;
 	}
 
-      if (htab->params->plt_stub_align != 0)
-	{
-	  unsigned pad = plt_stub_pad (htab, stub_entry, off);
-
-	  stub_entry->group->stub_sec->size += pad;
-	  stub_entry->stub_offset = stub_entry->group->stub_sec->size;
-	  loc += pad;
-	}
-
       r = NULL;
       if (info->emitrelocations)
 	{
@@ -11496,7 +11484,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  r[0].r_offset = loc - stub_entry->group->stub_sec->contents;
 	  if (bfd_big_endian (info->output_bfd))
 	    r[0].r_offset += 2;
-	  r[0].r_addend = dest;
+	  r[0].r_addend = targ;
 	}
       if (stub_entry->h != NULL
 	  && (stub_entry->h == htab->tls_get_addr_fd
@@ -11515,7 +11503,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
       return FALSE;
     }
 
-  stub_entry->group->stub_sec->size += p - loc;
+  stub_entry->group->stub_sec->size = stub_entry->stub_offset + (p - loc);
 
   if (htab->params->emit_stub_syms)
     {
@@ -11567,7 +11555,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
   struct ppc_stub_hash_entry *stub_entry;
   struct bfd_link_info *info;
   struct ppc_link_hash_table *htab;
-  bfd_vma off;
+  bfd_vma targ, off;
   int size;
 
   /* Massage our args to the form they really have.  */
@@ -11578,6 +11566,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
   if (htab == NULL)
     return FALSE;
 
+  /* Make a note of the offset within the stubs for this entry.  */
+  stub_entry->stub_offset = stub_entry->group->stub_sec->size;
+
   if (stub_entry->h != NULL
       && stub_entry->h->save_res
       && stub_entry->h->elf.root.type == bfd_link_hash_defined
@@ -11594,8 +11585,8 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
       || stub_entry->stub_type == ppc_stub_plt_call_r2save)
     {
       asection *plt;
-      off = stub_entry->plt_ent->plt.offset & ~(bfd_vma) 1;
-      if (off >= (bfd_vma) -2)
+      targ = stub_entry->plt_ent->plt.offset & ~(bfd_vma) 1;
+      if (targ >= (bfd_vma) -2)
 	abort ();
       plt = htab->elf.splt;
       if (!htab->elf.dynamic_sections_created
@@ -11607,23 +11598,30 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	  else
 	    plt = htab->pltlocal;
 	}
-      off += (plt->output_offset
-	      + plt->output_section->vma
-	      - elf_gp (info->output_bfd)
-	      - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+      targ += plt->output_offset + plt->output_section->vma;
+
+      off = (elf_gp (info->output_bfd)
+	     + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+      off = targ - off;
+
+      if (htab->params->plt_stub_align != 0)
+	{
+	  unsigned pad = plt_stub_pad (htab, stub_entry, off);
+
+	  stub_entry->group->stub_sec->size += pad;
+	  stub_entry->stub_offset = stub_entry->group->stub_sec->size;
+	}
 
       size = plt_stub_size (htab, stub_entry, off);
+
       if (stub_entry->h != NULL
 	  && (stub_entry->h == htab->tls_get_addr_fd
 	      || stub_entry->h == htab->tls_get_addr)
 	  && htab->params->tls_get_addr_opt
-	  && (ALWAYS_EMIT_R2SAVE
-	      || stub_entry->stub_type == ppc_stub_plt_call_r2save))
+	  && stub_entry->stub_type == ppc_stub_plt_call_r2save)
 	stub_entry->group->tls_get_addr_opt_bctrl
-	  = stub_entry->group->stub_sec->size + size - 5 * 4;
+	  = stub_entry->stub_offset + size - 5 * 4;
 
-      if (htab->params->plt_stub_align)
-	size += plt_stub_pad (htab, stub_entry, off);
       if (info->emitrelocations)
 	{
 	  stub_entry->group->stub_sec->reloc_count
@@ -11642,12 +11640,12 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
       bfd_vma r2off = 0;
       bfd_vma local_off = 0;
 
-      off = (stub_entry->target_value
-	     + stub_entry->target_section->output_offset
-	     + stub_entry->target_section->output_section->vma);
-      off -= (stub_entry->group->stub_sec->size
-	      + stub_entry->group->stub_sec->output_offset
-	      + stub_entry->group->stub_sec->output_section->vma);
+      targ = (stub_entry->target_value
+	      + stub_entry->target_section->output_offset
+	      + stub_entry->target_section->output_section->vma);
+      off = (stub_entry->stub_offset
+	     + stub_entry->group->stub_sec->output_offset
+	     + stub_entry->group->stub_sec->output_section->vma);
 
       /* Reset the stub type from the plt variant in case we now
 	 can reach with a shorter stub.  */
@@ -11668,8 +11666,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	    size += 4;
 	  if (PPC_LO (r2off) != 0)
 	    size += 4;
-	  off -= size - 4;
+	  off += size - 4;
 	}
+      off = targ - off;
 
       local_off = PPC64_LOCAL_ENTRY_OFFSET (stub_entry->other);
 
@@ -11709,11 +11708,12 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
 	    }
 
 	  stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
-	  off = (br_entry->offset
-		 + htab->brlt->output_offset
-		 + htab->brlt->output_section->vma
-		 - elf_gp (info->output_bfd)
-		 - htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+	  targ = (br_entry->offset
+		  + htab->brlt->output_offset
+		  + htab->brlt->output_section->vma);
+	  off = (elf_gp (info->output_bfd)
+		 + htab->sec_info[stub_entry->group->link_sec->id].toc_off);
+	  off = targ - off;
 
 	  if (info->emitrelocations)
 	    {
@@ -13530,7 +13530,8 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info)
 		}
 
 	      val = sym->st_value + ent->addend;
-	      val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
+	      if (ELF_ST_TYPE (sym->st_info) != STT_GNU_IFUNC)
+		val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
 	      if (sym_sec != NULL && sym_sec->output_section != NULL)
 		val += sym_sec->output_offset + sym_sec->output_section->vma;
 
@@ -14877,10 +14878,13 @@ ppc64_elf_relocate_section (bfd *output_bfd,
 	      addend = 0;
 	      reloc_dest = DEST_STUB;
 
-	      if ((stub_entry->stub_type == ppc_stub_plt_call
+	      if (((stub_entry->stub_type == ppc_stub_plt_call
+		    && ALWAYS_EMIT_R2SAVE)
 		   || stub_entry->stub_type == ppc_stub_plt_call_r2save)
-		  && (ALWAYS_EMIT_R2SAVE
-		      || stub_entry->stub_type == ppc_stub_plt_call_r2save)
+		  && !(h != NULL
+		       && (h == htab->tls_get_addr_fd
+			   || h == htab->tls_get_addr)
+		       && htab->params->tls_get_addr_opt)
 		  && rel + 1 < relend
 		  && rel[1].r_offset == rel->r_offset + 4
 		  && ELF64_R_TYPE (rel[1].r_info) == R_PPC64_TOCSAVE)
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 8c45d3257e..86004d1d87 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -784,13 +784,44 @@ elf64_sparc_print_symbol_all (bfd *abfd ATTRIBUTE_UNUSED, void * filep,
     return symbol->name;
 }
 
+/* Used to decide how to sort relocs in an optimal manner for the
+   dynamic linker, before writing them out.  */
+
 static enum elf_reloc_type_class
-elf64_sparc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+elf64_sparc_reloc_type_class (const struct bfd_link_info *info,
 			      const asection *rel_sec ATTRIBUTE_UNUSED,
 			      const Elf_Internal_Rela *rela)
 {
+  bfd *abfd = info->output_bfd;
+  const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+  struct _bfd_sparc_elf_link_hash_table *htab
+    = _bfd_sparc_elf_hash_table (info);
+  BFD_ASSERT (htab != NULL);
+
+  if (htab->elf.dynsym != NULL
+      && htab->elf.dynsym->contents != NULL)
+    {
+      /* Check relocation against STT_GNU_IFUNC symbol if there are
+	 dynamic symbols.  */
+      unsigned long r_symndx = htab->r_symndx (rela->r_info);
+      if (r_symndx != STN_UNDEF)
+	{
+	  Elf_Internal_Sym sym;
+	  if (!bed->s->swap_symbol_in (abfd,
+				       (htab->elf.dynsym->contents
+					+ r_symndx * bed->s->sizeof_sym),
+				       0, &sym))
+	    abort ();
+
+	  if (ELF_ST_TYPE (sym.st_info) == STT_GNU_IFUNC)
+	    return reloc_class_ifunc;
+	}
+    }
+
   switch ((int) ELF64_R_TYPE (rela->r_info))
     {
+    case R_SPARC_IRELATIVE:
+      return reloc_class_ifunc;
     case R_SPARC_RELATIVE:
       return reloc_class_relative;
     case R_SPARC_JMP_SLOT:
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c3a6c31ed2..e265cf324e 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1426,7 +1426,7 @@ elf_x86_64_need_pic (struct bfd_link_info *info,
 	  break;
 	}
 
-      if (!h->def_regular && !h->def_dynamic)
+      if (!SYMBOL_DEFINED_NON_SHARED_P (h) && !h->def_dynamic)
 	und = _("undefined ");
     }
   else
@@ -1855,6 +1855,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
       const char *name;
       bfd_boolean size_reloc;
       bfd_boolean converted_reloc;
+      bfd_boolean do_check_pic;
 
       r_symndx = htab->r_sym (rel->r_info);
       r_type = ELF32_R_TYPE (rel->r_info);
@@ -2130,6 +2131,13 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
 	  size_reloc = TRUE;
 	  goto do_size;
 
+	case R_X86_64_PC8:
+	case R_X86_64_PC16:
+	case R_X86_64_PC32:
+	case R_X86_64_PC32_BND:
+	  do_check_pic = TRUE;
+	  goto check_pic;
+
 	case R_X86_64_32:
 	  if (!ABI_64_P (abfd))
 	    goto pointer;
@@ -2153,13 +2161,11 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
 					&x86_64_elf_howto_table[r_type]);
 	  /* Fall through.  */
 
-	case R_X86_64_PC8:
-	case R_X86_64_PC16:
-	case R_X86_64_PC32:
-	case R_X86_64_PC32_BND:
 	case R_X86_64_PC64:
 	case R_X86_64_64:
 pointer:
+	  do_check_pic = FALSE;
+check_pic:
 	  if (eh != NULL && (sec->flags & SEC_CODE) != 0)
 	    eh->zero_undefweak |= 0x2;
 	  /* We are called after all symbols have been resolved.  Only
@@ -2223,6 +2229,67 @@ pointer:
 		}
 	    }
 
+	  if (do_check_pic)
+	    {
+	      /* Don't complain about -fPIC if the symbol is undefined
+	         when building executable unless it is unresolved weak
+		 symbol, references a dynamic definition in PIE or
+		 -z nocopyreloc is used.  */
+	      bfd_boolean no_copyreloc_p
+		= (info->nocopyreloc
+		   || (h != NULL
+		       && eh->def_protected
+		       && elf_has_no_copy_on_protected (h->root.u.def.section->owner)));
+	      if ((sec->flags & SEC_ALLOC) != 0
+		  && (sec->flags & SEC_READONLY) != 0
+		  && h != NULL
+		  && ((bfd_link_executable (info)
+		       && ((h->root.type == bfd_link_hash_undefweak
+			    && (eh == NULL
+				|| !UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
+								     eh)))
+			   || (bfd_link_pie (info)
+			       && !SYMBOL_DEFINED_NON_SHARED_P (h)
+			       && h->def_dynamic)
+			   || (no_copyreloc_p
+			       && h->def_dynamic
+			       && !(h->root.u.def.section->flags & SEC_CODE))))
+		      || bfd_link_dll (info)))
+		{
+		  bfd_boolean fail = FALSE;
+		  if (SYMBOL_REFERENCES_LOCAL_P (info, h))
+		    {
+		      /* Symbol is referenced locally.  Make sure it is
+			 defined locally.  */
+		      fail = !SYMBOL_DEFINED_NON_SHARED_P (h);
+		    }
+		  else if (bfd_link_pie (info))
+		    {
+		      /* We can only use PC-relative relocations in PIE
+			 from non-code sections.  */
+		      if (h->type == STT_FUNC
+			  && (sec->flags & SEC_CODE) != 0)
+			fail = TRUE;
+		    }
+		  else if (no_copyreloc_p || bfd_link_dll (info))
+		    {
+		      /* Symbol doesn't need copy reloc and isn't
+			 referenced locally.  Don't allow PC-relative
+			 relocations against default and protected
+			 symbols since address of protected function
+			 and location of protected data may not be in
+			 the shared object.   */
+		      fail = (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+			      || ELF_ST_VISIBILITY (h->other) == STV_PROTECTED);
+		    }
+
+		  if (fail)
+		    return elf_x86_64_need_pic (info, abfd, sec, h,
+						symtab_hdr, isym,
+						&x86_64_elf_howto_table[r_type]);
+		}
+	    }
+
 	  size_reloc = FALSE;
 do_size:
 	  if (NEED_DYNAMIC_RELOCATION_P (info, TRUE, h, sec, r_type,
@@ -3066,56 +3133,14 @@ use_plt:
 	case R_X86_64_PC16:
 	case R_X86_64_PC32:
 	case R_X86_64_PC32_BND:
-	  /* Don't complain about -fPIC if the symbol is undefined when
-	     building executable unless it is unresolved weak symbol,
-	     references a dynamic definition in PIE or -z nocopyreloc
-	     is used.  */
-	  if ((input_section->flags & SEC_ALLOC) != 0
-	      && (input_section->flags & SEC_READONLY) != 0
-	      && h != NULL
-	      && ((bfd_link_executable (info)
-		   && ((h->root.type == bfd_link_hash_undefweak
-			&& !resolved_to_zero)
-		       || (bfd_link_pie (info)
-			   && !h->def_regular
-			   && h->def_dynamic)
-		       || ((info->nocopyreloc
-			    || (eh->def_protected
-				&& elf_has_no_copy_on_protected (h->root.u.def.section->owner)))
-			   && h->def_dynamic
-			   && !(h->root.u.def.section->flags & SEC_CODE))))
-		  || bfd_link_dll (info)))
-	    {
-	      bfd_boolean fail = FALSE;
-	      if (SYMBOL_REFERENCES_LOCAL_P (info, h))
-		{
-		  /* Symbol is referenced locally.  Make sure it is
-		     defined locally.  */
-		  fail = !(h->def_regular || ELF_COMMON_DEF_P (h));
-		}
-	      else if (!(bfd_link_pie (info)
-			 && (h->needs_copy || eh->needs_copy)))
-		{
-		  /* Symbol doesn't need copy reloc and isn't referenced
-		     locally.  Address of protected function may not be
-		     reachable at run-time.  */
-		  fail = (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-			  || (ELF_ST_VISIBILITY (h->other) == STV_PROTECTED
-			      && h->type == STT_FUNC));
-		}
-
-	      if (fail)
-		return elf_x86_64_need_pic (info, input_bfd, input_section,
-					    h, NULL, NULL, howto);
-	    }
 	  /* Since x86-64 has PC-relative PLT, we can use PLT in PIE
 	     as function address.  */
-	  else if (h != NULL
-		   && (input_section->flags & SEC_CODE) == 0
-		   && bfd_link_pie (info)
-		   && h->type == STT_FUNC
-		   && !h->def_regular
-		   && h->def_dynamic)
+	  if (h != NULL
+	      && (input_section->flags & SEC_CODE) == 0
+	      && bfd_link_pie (info)
+	      && h->type == STT_FUNC
+	      && !h->def_regular
+	      && h->def_dynamic)
 	    goto use_plt;
 	  /* Fall through.  */
 
@@ -4272,7 +4297,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
       else if (bfd_link_pic (info)
 	       && SYMBOL_REFERENCES_LOCAL_P (info, h))
 	{
-	  if (!(h->def_regular || ELF_COMMON_DEF_P (h)))
+	  if (!SYMBOL_DEFINED_NON_SHARED_P (h))
 	    return FALSE;
 	  BFD_ASSERT((h->got.offset & 1) != 0);
 	  rela.r_info = htab->r_info (0, R_X86_64_RELATIVE);
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b24fb95848..46091b6341 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -686,13 +686,11 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
       && !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.  */
@@ -2360,10 +2358,19 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
       return FALSE;
     }
 
+  bed = get_elf_backend_data (info->output_bfd);
+
   /* We only need version numbers for symbols defined in regular
      objects.  */
   if (!h->def_regular)
-    return TRUE;
+    {
+      /* Hide symbols defined in discarded input sections.  */
+      if ((h->root.type == bfd_link_hash_defined
+	   || h->root.type == bfd_link_hash_defweak)
+	  && discarded_section (h->root.u.def.section))
+	(*bed->elf_backend_hide_symbol) (info, h, TRUE);
+      return TRUE;
+    }
 
   hide = FALSE;
   bed = get_elf_backend_data (info->output_bfd);
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index cf321f32c2..d4964b1b11 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3845,7 +3845,7 @@ _bfd_aarch64_erratum_835769_scan (bfd *input_bfd,
 static bfd_boolean
 _bfd_aarch64_adrp_p (uint32_t insn)
 {
-  return ((insn & 0x9f000000) == 0x90000000);
+  return ((insn & AARCH64_ADRP_OP_MASK) == AARCH64_ADRP_OP);
 }
 
 
@@ -5074,7 +5074,7 @@ _bfd_aarch64_erratum_843419_branch_to_stub (struct bfd_hash_entry *gen_entry,
 	   + stub_entry->adrp_offset);
   insn = bfd_getl32 (contents + stub_entry->adrp_offset);
 
-  if ((insn & AARCH64_ADRP_OP_MASK) !=  AARCH64_ADRP_OP)
+  if (!_bfd_aarch64_adrp_p (insn))
     abort ();
 
   bfd_signed_vma imm =
@@ -5939,6 +5939,64 @@ bad_ifunc_reloc:
 # define movz_hw_R0	(0x52c00000)
 #endif
 
+/* Structure to hold payload for _bfd_aarch64_erratum_843419_clear_stub,
+   it is used to identify the stub information to reset.  */
+
+struct erratum_843419_branch_to_stub_clear_data
+{
+  bfd_vma adrp_offset;
+  asection *output_section;
+};
+
+/* Clear the erratum information for GEN_ENTRY if the ADRP_OFFSET and
+   section inside IN_ARG matches.  The clearing is done by setting the
+   stub_type to none.  */
+
+static bfd_boolean
+_bfd_aarch64_erratum_843419_clear_stub (struct bfd_hash_entry *gen_entry,
+					void *in_arg)
+{
+  struct elf_aarch64_stub_hash_entry *stub_entry
+    = (struct elf_aarch64_stub_hash_entry *) gen_entry;
+  struct erratum_843419_branch_to_stub_clear_data *data
+    = (struct erratum_843419_branch_to_stub_clear_data *) in_arg;
+
+  if (stub_entry->target_section != data->output_section
+      || stub_entry->stub_type != aarch64_stub_erratum_843419_veneer
+      || stub_entry->adrp_offset != data->adrp_offset)
+    return TRUE;
+
+  /* Change the stub type instead of removing the entry, removing from the hash
+     table would be slower and we have already reserved the memory for the entry
+     so there wouldn't be much gain.  Changing the stub also keeps around a
+     record of what was there before.  */
+  stub_entry->stub_type = aarch64_stub_none;
+
+  /* We're done and there could have been only one matching stub at that
+     particular offset, so abort further traversal.  */
+  return FALSE;
+}
+
+/* TLS Relaxations may relax an adrp sequence that matches the erratum 843419
+   sequence.  In this case the erratum no longer applies and we need to remove
+   the entry from the pending stub generation.  This clears matching adrp insn
+   at ADRP_OFFSET in INPUT_SECTION in the stub table defined in GLOBALS.  */
+
+static void
+clear_erratum_843419_entry (struct elf_aarch64_link_hash_table *globals,
+			    bfd_vma adrp_offset, asection *input_section)
+{
+  if (globals->fix_erratum_843419)
+    {
+      struct erratum_843419_branch_to_stub_clear_data data;
+      data.adrp_offset = adrp_offset;
+      data.output_section = input_section;
+
+      bfd_hash_traverse (&globals->stub_hash_table,
+			 _bfd_aarch64_erratum_843419_clear_stub, &data);
+    }
+}
+
 /* Handle TLS relaxations.  Relaxing is possible for symbols that use
    R_AARCH64_TLSDESC_ADR_{PAGE, LD64_LO12_NC, ADD_LO12_NC} during a static
    link.
@@ -5949,8 +6007,9 @@ bad_ifunc_reloc:
 
 static bfd_reloc_status_type
 elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
-			 bfd *input_bfd, bfd_byte *contents,
-			 Elf_Internal_Rela *rel, struct elf_link_hash_entry *h)
+			 bfd *input_bfd, asection *input_section,
+			 bfd_byte *contents, Elf_Internal_Rela *rel,
+			 struct elf_link_hash_entry *h)
 {
   bfd_boolean is_local = h == NULL;
   unsigned int r_type = ELFNN_R_TYPE (rel->r_info);
@@ -5971,6 +6030,9 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
 
 	     Where R is x for LP64, and w for ILP32.  */
 	  bfd_putl32 (movz_R0, contents + rel->r_offset);
+	  /* We have relaxed the adrp into a mov, we may have to clear any
+	     pending erratum fixes.  */
+	  clear_erratum_843419_entry (globals, rel->r_offset, input_section);
 	  return bfd_reloc_continue;
 	}
       else
@@ -6261,6 +6323,9 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
 	{
 	  insn = bfd_getl32 (contents + rel->r_offset);
 	  bfd_putl32 (movz_R0 | (insn & 0x1f), contents + rel->r_offset);
+	  /* We have relaxed the adrp into a mov, we may have to clear any
+	     pending erratum fixes.  */
+	  clear_erratum_843419_entry (globals, rel->r_offset, input_section);
 	}
       return bfd_reloc_continue;
 
@@ -6485,7 +6550,8 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
 	  howto = elfNN_aarch64_howto_from_bfd_reloc (bfd_r_type);
 	  BFD_ASSERT (howto != NULL);
 	  r_type = howto->type;
-	  r = elfNN_aarch64_tls_relax (globals, input_bfd, contents, rel, h);
+	  r = elfNN_aarch64_tls_relax (globals, input_bfd, input_section,
+				       contents, rel, h);
 	  unresolved_reloc = 0;
 	}
       else
@@ -8076,6 +8142,8 @@ aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
       if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr))
 	return FALSE;
       break;
+    case aarch64_stub_none:
+      break;
 
     default:
       abort ();
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index a2497aab86..2d8f7b640b 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -2407,12 +2407,27 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
   switch (pr_type)
     {
     case GNU_PROPERTY_X86_ISA_1_USED:
+      if (aprop == NULL || bprop == NULL)
+	{
+	  /* Only one of APROP and BPROP can be NULL.  */
+	  if (aprop != NULL)
+	    {
+	      /* Remove this property since the other input file doesn't
+		 have it.  */
+	      aprop->pr_kind = property_remove;
+	      updated = TRUE;
+	    }
+	  break;
+	}
+      goto or_property;
+
     case GNU_PROPERTY_X86_ISA_1_NEEDED:
       if (aprop != NULL && bprop != NULL)
 	{
+or_property:
 	  number = aprop->u.number;
 	  aprop->u.number = number | bprop->u.number;
-	  /* Remove the property if ISA bits are empty.  */
+	  /* Remove the property if all bits are empty.  */
 	  if (aprop->u.number == 0)
 	    {
 	      aprop->pr_kind = property_remove;
@@ -2428,14 +2443,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
 	    {
 	      if (aprop->u.number == 0)
 		{
-		  /* Remove APROP if ISA bits are empty.  */
+		  /* Remove APROP if all bits are empty.  */
 		  aprop->pr_kind = property_remove;
 		  updated = TRUE;
 		}
 	    }
 	  else
 	    {
-	      /* Return TRUE if APROP is NULL and ISA bits of BPROP
+	      /* Return TRUE if APROP is NULL and all bits of BPROP
 		 aren't empty to indicate that BPROP should be added
 		 to ABFD.  */
 	      updated = bprop->u.number != 0;
@@ -2524,6 +2539,7 @@ _bfd_x86_elf_link_setup_gnu_properties
   const struct elf_backend_data *bed;
   unsigned int class_align = ABI_64_P (info->output_bfd) ? 3 : 2;
   unsigned int got_align;
+  bfd_boolean has_text = FALSE;
 
   features = 0;
   if (info->ibt)
@@ -2538,24 +2554,75 @@ _bfd_x86_elf_link_setup_gnu_properties
     if (bfd_get_flavour (pbfd) == bfd_target_elf_flavour
 	&& bfd_count_sections (pbfd) != 0)
       {
+	if (!has_text)
+	  {
+	    /* Check if there is no non-empty text section.  */
+	    sec = bfd_get_section_by_name (pbfd, ".text");
+	    if (sec != NULL && sec->size != 0)
+	      has_text = TRUE;
+	  }
+
 	ebfd = pbfd;
 
 	if (elf_properties (pbfd) != NULL)
 	  break;
       }
 
-  if (ebfd != NULL && features)
+  bed = get_elf_backend_data (info->output_bfd);
+
+  htab = elf_x86_hash_table (info, bed->target_id);
+  if (htab == NULL)
+    return pbfd;
+
+  if (ebfd != NULL)
     {
-      /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and
-	 GNU_PROPERTY_X86_FEATURE_1_SHSTK.  */
-      prop = _bfd_elf_get_property (ebfd,
-				    GNU_PROPERTY_X86_FEATURE_1_AND,
-				    4);
-      prop->u.number |= features;
-      prop->pr_kind = property_number;
+      prop = NULL;
+      if (features)
+	{
+	  /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and
+	     GNU_PROPERTY_X86_FEATURE_1_SHSTK.  */
+	  prop = _bfd_elf_get_property (ebfd,
+					GNU_PROPERTY_X86_FEATURE_1_AND,
+					4);
+	  prop->u.number |= features;
+	  prop->pr_kind = property_number;
+	}
+      else if (has_text
+	       && elf_tdata (info->output_bfd)->o->build_id.sec == NULL
+	       && !htab->elf.dynamic_sections_created
+	       && !info->traditional_format
+	       && (info->output_bfd->flags & D_PAGED) != 0
+	       && info->separate_code)
+	{
+	  /* If the separate code program header is needed, make sure
+	     that the first read-only PT_LOAD segment has no code by
+	     adding a GNU_PROPERTY_X86_ISA_1_NEEDED note.  */
+	  elf_property_list *list;
+	  bfd_boolean need_property = TRUE;
+
+	  for (list = elf_properties (ebfd); list; list = list->next)
+	    switch (list->property.pr_type)
+	      {
+	      case GNU_PROPERTY_STACK_SIZE:
+	      case GNU_PROPERTY_NO_COPY_ON_PROTECTED:
+	      case GNU_PROPERTY_X86_ISA_1_NEEDED:
+		/* These properties won't be removed during merging.  */
+		need_property = FALSE;
+		break;
+	      }
+
+	  if (need_property)
+	    {
+	      prop = _bfd_elf_get_property (ebfd,
+					    GNU_PROPERTY_X86_ISA_1_NEEDED,
+					    4);
+	      prop->u.number = GNU_PROPERTY_X86_ISA_1_486;
+	      prop->pr_kind = property_number;
+	    }
+	}
 
       /* Create the GNU property note section if needed.  */
-      if (pbfd == NULL)
+      if (prop != NULL && pbfd == NULL)
 	{
 	  sec = bfd_make_section_with_flags (ebfd,
 					     NOTE_GNU_PROPERTY_SECTION_NAME,
@@ -2581,12 +2648,6 @@ error_alignment:
 
   pbfd = _bfd_elf_link_setup_gnu_properties (info);
 
-  bed = get_elf_backend_data (info->output_bfd);
-
-  htab = elf_x86_hash_table (info, bed->target_id);
-  if (htab == NULL)
-    return pbfd;
-
   htab->r_info = init_table->r_info;
   htab->r_sym = init_table->r_sym;
 
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index 6a5609467d..1f757fda0c 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -162,6 +162,13 @@
        || (ELF_ST_VISIBILITY ((H)->other) \
 	   && (H)->root.type == bfd_link_hash_undefweak))
 
+/* TRUE if this symbol isn't defined by a shared object.  */
+#define SYMBOL_DEFINED_NON_SHARED_P(H) \
+  ((H)->def_regular \
+   || (H)->root.linker_def \
+   || (H)->root.ldscript_def \
+   || ELF_COMMON_DEF_P (H))
+
 /* TRUE if relative relocation should be generated.  GOT reference to
    global symbol in PIC will lead to dynamic symbol.  It becomes a
    problem when "time" or "times" is defined as a variable in an
diff --git a/bfd/version.h b/bfd/version.h
index 222d2e62c3..38bee253c8 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -16,7 +16,7 @@
 
    In releases, the date is not included in either version strings or
    sonames.  */
-#define BFD_VERSION_DATE 20180718
+#define BFD_VERSION_DATE 20190122
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 32f47d5e07..2bb000a3c5 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,21 @@
+2019-02-18  Nick Clifton  <nickc@redhat.com>
+
+	Import from the mainline:
+	2018-11-27  Mark Wielaard  <mark@klomp.org>
+
+	PR binutils/23919
+	* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
+	(dump_sections_as_bytes): Likewise.
+	(load_specific_debug_sections): Likewise.
+	* testsuite/binutils-all/dw2-3.rS: Adjust alignment.
+	* testsuite/binutils-all/dw2-3.rt: Likewise.
+
+2018-09-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23499
+	* readelf.c (get_symbol_version_string): Return _("<corrupt>")
+	for corrupt symbol version info.
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 1b50ba7631..4b0efa884f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -11252,6 +11252,7 @@ get_symbol_version_string (Filedata *                   filedata,
   unsigned char data[2];
   unsigned short vers_data;
   unsigned long offset;
+  unsigned short max_vd_ndx;
 
   if (!is_dynsym
       || version_info[DT_VERSIONTAGIDX (DT_VERSYM)] == 0)
@@ -11269,6 +11270,8 @@ get_symbol_version_string (Filedata *                   filedata,
   if ((vers_data & VERSYM_HIDDEN) == 0 && vers_data == 0)
     return NULL;
 
+  max_vd_ndx = 0;
+
   /* Usually we'd only see verdef for defined symbols, and verneed for
      undefined symbols.  However, symbols defined by the linker in
      .dynbss for variables copied from a shared library in order to
@@ -11311,6 +11314,9 @@ get_symbol_version_string (Filedata *                   filedata,
 	      ivd.vd_flags = BYTE_GET (evd.vd_flags);
 	    }
 
+	  if ((ivd.vd_ndx & VERSYM_VERSION) > max_vd_ndx)
+	    max_vd_ndx = ivd.vd_ndx & VERSYM_VERSION;
+
 	  off += ivd.vd_next;
 	}
       while (ivd.vd_ndx != (vers_data & VERSYM_VERSION) && ivd.vd_next != 0);
@@ -11402,6 +11408,9 @@ get_symbol_version_string (Filedata *                   filedata,
 	  return (ivna.vna_name < strtab_size
 		  ? strtab + ivna.vna_name : _("<corrupt>"));
 	}
+      else if ((max_vd_ndx || (vers_data & VERSYM_VERSION) != 1)
+	       && (vers_data & VERSYM_VERSION) > max_vd_ndx)
+	return _("<corrupt>");
     }
   return NULL;
 }
@@ -13336,12 +13345,6 @@ dump_section_as_strings (Elf_Internal_Shdr * section, Filedata * filedata)
 		    printable_section_name (filedata, section), chdr.ch_type);
 	      return FALSE;
 	    }
-	  else if (chdr.ch_addralign != section->sh_addralign)
-	    {
-	      warn (_("compressed section '%s' is corrupted\n"),
-		    printable_section_name (filedata, section));
-	      return FALSE;
-	    }
 	  uncompressed_size = chdr.ch_size;
 	  start += compression_header_size;
 	  new_size -= compression_header_size;
@@ -13483,12 +13486,6 @@ dump_section_as_bytes (Elf_Internal_Shdr *  section,
 		    printable_section_name (filedata, section), chdr.ch_type);
 	      return FALSE;
 	    }
-	  else if (chdr.ch_addralign != section->sh_addralign)
-	    {
-	      warn (_("compressed section '%s' is corrupted\n"),
-		    printable_section_name (filedata, section));
-	      return FALSE;
-	    }
 	  uncompressed_size = chdr.ch_size;
 	  start += compression_header_size;
 	  new_size -= compression_header_size;
@@ -13658,12 +13655,6 @@ load_specific_debug_section (enum dwarf_section_display_enum  debug,
 		    section->name, chdr.ch_type);
 	      return FALSE;
 	    }
-	  else if (chdr.ch_addralign != sec->sh_addralign)
-	    {
-	      warn (_("compressed section '%s' is corrupted\n"),
-		    section->name);
-	      return FALSE;
-	    }
 	  uncompressed_size = chdr.ch_size;
 	  start += compression_header_size;
 	  size -= compression_header_size;
diff --git a/binutils/testsuite/binutils-all/dw2-3.rS b/binutils/testsuite/binutils-all/dw2-3.rS
index f1637e9149..86bc73d9a2 100644
--- a/binutils/testsuite/binutils-all/dw2-3.rS
+++ b/binutils/testsuite/binutils-all/dw2-3.rS
@@ -1,3 +1,3 @@
 #...
- +\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +1
+ +\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +(4|8)
 #pass
diff --git a/binutils/testsuite/binutils-all/dw2-3.rt b/binutils/testsuite/binutils-all/dw2-3.rt
index f59cbaa22b..74e7f8deca 100644
--- a/binutils/testsuite/binutils-all/dw2-3.rt
+++ b/binutils/testsuite/binutils-all/dw2-3.rt
@@ -1,6 +1,6 @@
 #...
  +\[[ 0-9]+\] .debug_info
- +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +1
+ +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +(4|8)
  +\[0+800\]: COMPRESSED
  +ZLIB, 0+9d, 1
 #pass
diff --git a/gas/ChangeLog b/gas/ChangeLog
index bb4541900d..97d370dad3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,112 @@
+2019-02-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/24165
+	* config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Set to
+	(alignment ? ((1 << alignment) - 1) : 1)
+	(i386_tc_frag_data): Add max_bytes.
+	(TC_FRAG_INIT): Track max_chars in max_bytes.
+	(HANDLE_ALIGN): Replace MAX_MEM_FOR_RS_ALIGN_CODE with
+	fragP->tc_frag_data.max_bytes.
+
+2019-02-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* config/tc-visium.c (md_assemble) <mode_cad>: Align instruction on
+	64-bit boundaries for the GR6.
+	* testsuite/gas/visium/allinsn_gr6.s: Tweak.
+	* testsuite/gas/visium/allinsn_gr6.d: Likewise.
+	* testsuite/gas/visium/bra-1.d: New test.
+	* testsuite/gas/visium/bra-1.s: Likewise.
+	* testsuite/gas/visium/visium.exp: Run bra-1 test.
+
+2018-12-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/23968
+	* config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Put back
+	BFD_RELOC_X86_64_GOTPCREL.
+	* testsuite/gas/i386/i386.exp: Run x86-64-gotpcrel-2.
+	* testsuite/gas/i386/x86-64-gotpcrel-2.d: New file.
+	* testsuite/gas/i386/x86-64-gotpcrel-2.s: Likewise.
+	* testsuite/gas/i386/ilp32/x86-64-gotpcrel-2.d: Likewise.
+
+2018-11-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/23854
+	* config/tc-i386.c (output_disp): Disable GOT relaxation with
+	data prefix.
+	* testsuite/gas/i386/mixed-mode-reloc32.d: Updated.
+
+2018-10-19  Tamar Christina  <tamar.christina@arm.com>
+
+	* testsuite/gas/arm/undefined-insn-arm.d: Widen pe skip.
+	* testsuite/gas/arm/undefined-insn-thumb.d: Likewise.
+
+2018-10-19  Tamar Christina  <tamar.christina@arm.com>
+
+	* testsuite/gas/arm/undefined-insn-arm.d: New test.
+	* testsuite/gas/arm/undefined-insn-thumb.d: New test.
+	* testsuite/gas/arm/undefined-insn.s: New test.
+
+2018-10-16  Matthew Malcomson  <matthew.malcomson@arm.com>
+
+	* testsuite/gas/aarch64/illegal-dotproduct.d: New test.
+	* testsuite/gas/aarch64/illegal-dotproduct.l: New test.
+	* testsuite/gas/aarch64/illegal-dotproduct.s: New test.
+
+2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/gas/i386/se1.s: Add enclv.
+	* testsuite/gas/i386/x86-64-se1.s: Likewise.
+	* testsuite/gas/i386/se1.d: Updated.
+	* testsuite/gas/i386/x86-64-se1.d: Likewise.
+
+2018-09-18  Tamar Christina  <tamar.christina@arm.com>
+
+	* config/tc-aarch64.c (output_operand_error_report): Apply filtering to
+	current instead of head message.
+
+2018-09-17  Nick Clifton  <nickc@redhat.com>
+
+	backport from mainline:
+	* 2018-08-14  Robert Yang  <liezhi.yang@windriver.com>
+
+	* as.c (main): Improve check for input file matching output file.
+
+2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/gas/i386/evex-no-scale.s: Removed.
+	* testsuite/gas/i386/evex-no-scale-32.d: Don't use
+	evex-no-scale.s.
+	* testsuite/gas/i386/evex-no-scale-64.d: Likewise.
+	* testsuite/gas/i386/evex-no-scale-32.s: New file.
+	* testsuite/gas/i386/evex-no-scale-64.s: Likewise.
+
+2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/gas/i386/i386.exp: Run evex-no-scale-32 and
+	evex-no-scale-64 only for ELF targets.
+
+2018-07-31  Jan Beulich  <jbeulich@suse.com>
+
+	PR gas/23465
+	* config/tc-i386.c (output_disp): Restrict scaling.
+	* testsuite/gas/i386/evex-no-scale.s,
+	  testsuite/gas/i386/evex-no-scale-32.d
+	  testsuite/gas/i386/evex-no-scale-64.d: New.
+	* testsuite/gas/i386/i386.exp: Run new tests.
+
+2018-07-30  John David Anglin  <danglin@gcc.gnu.org>
+
+	* config/tc-hppa.c: Include "struc-symbol.h".
+	(pa_build_unwind_subspace): Use call_info->start_symbol->sy_frag
+	instead of frag_now for local symbol replacement.
+
+2018-07-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/23418
+	* testsuite/gas/i386/xmmword.s: Add tests for vcvtps2qq,
+	vcvtps2uqq, vcvttps2qq and vcvttps2uqq.
+	* testsuite/gas/i386/xmmword.l: Updated.
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
diff --git a/gas/as.c b/gas/as.c
index 02c7d2970b..919c24a24a 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1254,14 +1254,27 @@ main (int argc, char ** argv)
 	{
 	  struct stat sib;
 
-	  if (stat (argv[i], &sib) == 0)
+	  /* Check that the input file and output file are different.  */
+	  if (stat (argv[i], &sib) == 0
+	      && sib.st_ino == sob.st_ino
+	      /* POSIX emulating systems may support stat() but if the
+		 underlying file system does not support a file serial number
+		 of some kind then they will return 0 for the inode.  So
+		 two files with an inode of 0 may not actually be the same.
+		 On real POSIX systems no ordinary file will ever have an
+		 inode of 0.  */
+	      && sib.st_ino != 0
+	      /* Different files may have the same inode number if they
+		 reside on different devices, so check the st_dev field as
+		 well.  */
+	      && sib.st_dev == sob.st_dev)
 	    {
-	      if (sib.st_ino == sob.st_ino && sib.st_ino != 0)
-		{
-		  /* Don't let as_fatal remove the output file!  */
-		  out_file_name = NULL;
-		  as_fatal (_("The input and output files must be distinct"));
-		}
+	      const char *saved_out_file_name = out_file_name;
+
+	      /* Don't let as_fatal remove the output file!  */
+	      out_file_name = NULL;
+	      as_fatal (_("The input '%s' and output '%s' files are the same"),
+			argv[i], saved_out_file_name);
 	    }
 	}
     }
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 31985963e3..c77de21d19 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -4809,7 +4809,7 @@ output_operand_error_report (char *str, bfd_boolean non_fatal_only)
       /* If we don't want to print non-fatal errors then don't consider them
 	 at all.  */
       if (curr->detail.kind != kind
-	  || (non_fatal_only && !head->detail.non_fatal))
+	  || (non_fatal_only && !curr->detail.non_fatal))
 	continue;
       /* If there are multiple errors, pick up the one with the highest
 	 mismatching operand index.  In the case of multiple errors with
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index e69fdb2b39..ccae68cb40 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -23,6 +23,7 @@
 
 #include "as.h"
 #include "safe-ctype.h"
+#include "struc-symbol.h"
 #include "subsegs.h"
 #include "dw2gencfi.h"
 
@@ -5989,7 +5990,8 @@ pa_build_unwind_subspace (struct call_info *call_info)
   else
     {
       symbolP = symbol_new (name, now_seg,
-			    S_GET_VALUE (call_info->start_symbol), frag_now);
+			    S_GET_VALUE (call_info->start_symbol),
+			    call_info->start_symbol->sy_frag);
       gas_assert (symbolP);
       S_CLEAR_EXTERNAL (symbolP);
       symbol_table_insert (symbolP);
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 2d20f1cae9..a288a31844 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -7857,7 +7857,8 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
 	      int size = disp_size (n);
 	      offsetT val = i.op[n].disps->X_add_number;
 
-	      val = offset_in_range (val >> i.memshift, size);
+	      val = offset_in_range (val >> (size == 1 ? i.memshift : 0),
+				     size);
 	      p = frag_more (size);
 	      md_number_to_chars (p, val, size);
 	    }
@@ -7942,12 +7943,13 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off)
 	      /* Check for "call/jmp *mem", "mov mem, %reg",
 		 "test %reg, mem" and "binop mem, %reg" where binop
 		 is one of adc, add, and, cmp, or, sbb, sub, xor
-		 instructions.  Always generate R_386_GOT32X for
-		 "sym*GOT" operand in 32-bit mode.  */
-	      if ((generate_relax_relocations
-		   || (!object_64bit
-		       && i.rm.mode == 0
-		       && i.rm.regmem == 5))
+		 instructions without data prefix.  Always generate
+		 R_386_GOT32X for "sym*GOT" operand in 32-bit mode.  */
+	      if (i.prefix[DATA_PREFIX] == 0
+		  && (generate_relax_relocations
+		      || (!object_64bit
+			  && i.rm.mode == 0
+			  && i.rm.regmem == 5))
 		  && (i.rm.mode == 2
 		      || (i.rm.mode == 0 && i.rm.regmem == 5))
 		  && ((i.operands == 1
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 833047980b..46a0381777 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -174,6 +174,7 @@ extern int tc_i386_fix_adjustable (struct fix *);
   (GENERIC_FORCE_RELOCATION_LOCAL (FIX)				\
    || (FIX)->fx_r_type == BFD_RELOC_386_PLT32			\
    || (FIX)->fx_r_type == BFD_RELOC_386_GOTPC			\
+   || (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCREL		\
    || (FIX)->fx_r_type == BFD_RELOC_X86_64_GOTPCRELX		\
    || (FIX)->fx_r_type == BFD_RELOC_X86_64_REX_GOTPCRELX)
 
@@ -205,7 +206,7 @@ if ((n)									\
     goto around;							\
   }
 
-#define MAX_MEM_FOR_RS_ALIGN_CODE 4095
+#define MAX_MEM_FOR_RS_ALIGN_CODE  (alignment ? ((1 << alignment) - 1) : 1)
 
 void i386_print_statistics (FILE *);
 #define tc_print_statistics i386_print_statistics
@@ -250,6 +251,7 @@ struct i386_tc_frag_data
   enum processor_type isa;
   i386_cpu_flags isa_flags;
   enum processor_type tune;
+  unsigned int max_bytes;
 };
 
 /* We need to emit the right NOP pattern in .align frags.  This is
@@ -257,12 +259,14 @@ struct i386_tc_frag_data
    the isa/tune settings at the time the .align was assembled.  */
 #define TC_FRAG_TYPE struct i386_tc_frag_data
 
+/* NB: max_chars is a local variable in frag_var_init.  */
 #define TC_FRAG_INIT(FRAGP)					\
  do								\
    {								\
      (FRAGP)->tc_frag_data.isa = cpu_arch_isa;			\
      (FRAGP)->tc_frag_data.isa_flags = cpu_arch_isa_flags;	\
      (FRAGP)->tc_frag_data.tune = cpu_arch_tune;		\
+     (FRAGP)->tc_frag_data.max_bytes = max_chars;		\
    }								\
  while (0)
 
@@ -279,7 +283,8 @@ if (fragP->fr_type == rs_align_code) 					\
     offsetT __count = (fragP->fr_next->fr_address			\
 		       - fragP->fr_address				\
 		       - fragP->fr_fix);				\
-    if (__count > 0 && __count <= MAX_MEM_FOR_RS_ALIGN_CODE)		\
+    if (__count > 0							\
+	&& (unsigned int) __count <= fragP->tc_frag_data.max_bytes)	\
       md_generate_nops (fragP, fragP->fr_literal + fragP->fr_fix,	\
 			__count, 0);					\
   }
diff --git a/gas/config/tc-visium.c b/gas/config/tc-visium.c
index 0bcb6e3af4..409ea99aaf 100644
--- a/gas/config/tc-visium.c
+++ b/gas/config/tc-visium.c
@@ -1368,6 +1368,10 @@ md_assemble (char *str0)
       if (previous_mode == mode_cad || previous_mode == mode_ci)
 	as_bad ("branch instruction in delay slot");
 
+      /* For the GR6, BRA insns must be aligned on 64-bit boundaries.  */
+      if (visium_arch == VISIUM_ARCH_GR6)
+	do_align (3, NULL, 0, 0);
+
       this_dest = r3;
       condition_code = cc;
       break;
diff --git a/gas/testsuite/gas/aarch64/illegal-dotproduct.d b/gas/testsuite/gas/aarch64/illegal-dotproduct.d
new file mode 100644
index 0000000000..8d8b1b8506
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/illegal-dotproduct.d
@@ -0,0 +1,4 @@
+#as: -march=armv8.2-a+dotprod
+#name: Invalid dotproduct instructions.
+#source: illegal-dotproduct.s
+#error-output: illegal-dotproduct.l
diff --git a/gas/testsuite/gas/aarch64/illegal-dotproduct.l b/gas/testsuite/gas/aarch64/illegal-dotproduct.l
new file mode 100644
index 0000000000..06d0d78b8d
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/illegal-dotproduct.l
@@ -0,0 +1,13 @@
+[^:]+: Assembler messages:
+[^:]+:[0-9]+: Error: register element index out of range 0 to 3 at operand 3 -- `udot V0.2S,V0.8B,V0.4B\[4\]'
+[^:]+:[0-9]+: Error: operand mismatch -- `udot V0.4S,V0.8B,V0.4B\[4\]'
+[^:]+:[0-9]+: Info:    did you mean this\?
+[^:]+:[0-9]+: Info:    	udot v0.2s, v0.8b, v0.4b\[4\]
+[^:]+:[0-9]+: Info:    other valid variant\(s\):
+[^:]+:[0-9]+: Info:    	udot v0.4s, v0.16b, v0.4b\[4\]
+[^:]+:[0-9]+: Error: register element index out of range 0 to 3 at operand 3 -- `sdot V0.2S,V0.8B,V0.4B\[4\]'
+[^:]+:[0-9]+: Error: operand mismatch -- `sdot V0.2S,V0.8B,V0.4H\[4\]'
+[^:]+:[0-9]+: Info:    did you mean this\?
+[^:]+:[0-9]+: Info:    	sdot v0.2s, v0.8b, v0.4b\[4\]
+[^:]+:[0-9]+: Info:    other valid variant\(s\):
+[^:]+:[0-9]+: Info:    	sdot v0.4s, v0.16b, v0.4b\[4\]
diff --git a/gas/testsuite/gas/aarch64/illegal-dotproduct.s b/gas/testsuite/gas/aarch64/illegal-dotproduct.s
new file mode 100644
index 0000000000..9c714ae54d
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/illegal-dotproduct.s
@@ -0,0 +1,4 @@
+UDOT	V0.2S, V0.8B, V0.4B[4]
+UDOT	V0.4S, V0.8B, V0.4B[4]
+SDOT	V0.2S, V0.8B, V0.4B[4]
+SDOT	V0.2S, V0.8B, V0.4H[4]
diff --git a/gas/testsuite/gas/arm/undefined-insn-arm.d b/gas/testsuite/gas/arm/undefined-insn-arm.d
new file mode 100644
index 0000000000..175e778b50
--- /dev/null
+++ b/gas/testsuite/gas/arm/undefined-insn-arm.d
@@ -0,0 +1,5 @@
+#name: Undefined binary printing in arm mode
+#skip: *-*-pe *-*-vxworks
+#source: undefined-insn.s
+#objdump: -D -b binary -m armv5te
+#...
diff --git a/gas/testsuite/gas/arm/undefined-insn-thumb.d b/gas/testsuite/gas/arm/undefined-insn-thumb.d
new file mode 100644
index 0000000000..a5b4159f1e
--- /dev/null
+++ b/gas/testsuite/gas/arm/undefined-insn-thumb.d
@@ -0,0 +1,5 @@
+#name: Undefined binary printing in thumb mode
+#skip: *-*-pe *-*-vxworks
+#source: undefined-insn.s
+#objdump: -D -b binary -m armv5te -M force-thumb
+#...
diff --git a/gas/testsuite/gas/arm/undefined-insn.s b/gas/testsuite/gas/arm/undefined-insn.s
new file mode 100644
index 0000000000..cf59a03d1d
--- /dev/null
+++ b/gas/testsuite/gas/arm/undefined-insn.s
@@ -0,0 +1 @@
+	.inst 0xffffffff
diff --git a/gas/testsuite/gas/i386/evex-no-scale-32.d b/gas/testsuite/gas/i386/evex-no-scale-32.d
new file mode 100644
index 0000000000..0a2860d32e
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-no-scale-32.d
@@ -0,0 +1,12 @@
+#objdump: -dw
+#name: ix86 EVEX no disp scaling
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <disp>:
+ +[a-f0-9]+:	62 f1 7c 48 28 04 05 40 00 00 00 	vmovaps 0x40\(,%eax,1\),%zmm0
+ +[a-f0-9]+:	62 f1 7c 48 28 04 25 40 00 00 00 	vmovaps 0x40\(,%eiz,1\),%zmm0
+ +[a-f0-9]+:	62 f1 7c 48 28 05 40 00 00 00 	vmovaps 0x40,%zmm0
+ +[a-f0-9]+:	67 62 f1 7c 48 28 06 40 00 	vmovaps 0x40,%zmm0
diff --git a/gas/testsuite/gas/i386/evex-no-scale-32.s b/gas/testsuite/gas/i386/evex-no-scale-32.s
new file mode 100644
index 0000000000..e28c73f2a3
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-no-scale-32.s
@@ -0,0 +1,7 @@
+	.allow_index_reg
+	.text
+disp:
+	vmovaps	64(,%eax), %zmm0
+	vmovaps	64(,%eiz), %zmm0
+	vmovaps	64, %zmm0
+	addr16 vmovaps 64, %zmm0
diff --git a/gas/testsuite/gas/i386/evex-no-scale-64.d b/gas/testsuite/gas/i386/evex-no-scale-64.d
new file mode 100644
index 0000000000..d52d947ab3
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-no-scale-64.d
@@ -0,0 +1,14 @@
+#objdump: -dw
+#name: x86-64 EVEX no disp scaling
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <disp>:
+ +[a-f0-9]+:	62 f1 7c 48 28 05 00 fc ff ff 	vmovaps -0x400\(%rip\),%zmm0        # .*
+ +[a-f0-9]+:	62 f1 7c 48 28 04 05 40 00 00 00 	vmovaps 0x40\(,%rax,1\),%zmm0
+ +[a-f0-9]+:	62 f1 7c 48 28 04 25 40 00 00 00 	vmovaps 0x40,%zmm0
+ +[a-f0-9]+:	67 62 f1 7c 48 28 04 05 40 00 00 00 	vmovaps 0x40\(,%eax,1\),%zmm0
+ +[a-f0-9]+:	67 62 f1 7c 48 28 04 25 40 00 00 00 	addr32 vmovaps 0x40,%zmm0
+ +[a-f0-9]+:	62 f1 7c 48 28 04 25 40 00 00 00 	vmovaps 0x40,%zmm0
diff --git a/gas/testsuite/gas/i386/evex-no-scale-64.s b/gas/testsuite/gas/i386/evex-no-scale-64.s
new file mode 100644
index 0000000000..bc3749cc0c
--- /dev/null
+++ b/gas/testsuite/gas/i386/evex-no-scale-64.s
@@ -0,0 +1,9 @@
+	.allow_index_reg
+	.text
+disp:
+	vmovaps	-1024(%rip), %zmm0
+	vmovaps	64(,%rax), %zmm0
+	vmovaps	64(,%riz), %zmm0
+	vmovaps	64(,%eax), %zmm0
+	vmovaps	64(,%eiz), %zmm0
+	vmovaps	64, %zmm0
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 9cc927a962..952902cbb6 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -525,6 +525,8 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
 	run_dump_test "nop-5"
 	run_dump_test "nop-6"
 
+	run_dump_test "evex-no-scale-32"
+
 	if { [gas_64_check] } then {
 	    run_dump_test "att-regs"
 	    run_dump_test "intel-regs"
@@ -1011,12 +1013,15 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
 
 	run_dump_test "x86-64-gotpcrel"
 	run_dump_test "x86-64-gotpcrel-no-relax"
+	run_dump_test "x86-64-gotpcrel-2"
 
 	run_dump_test "x86-64-addend"
 	run_dump_test "x86-64-nop-3"
 	run_dump_test "x86-64-nop-4"
 	run_dump_test "x86-64-nop-5"
 	run_dump_test "x86-64-nop-6"
+
+	run_dump_test "evex-no-scale-64"
     }
 
     set ASFLAGS "$old_ASFLAGS"
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel-2.d b/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel-2.d
new file mode 100644
index 0000000000..41b9ac2cc3
--- /dev/null
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-gotpcrel-2.d
@@ -0,0 +1,13 @@
+#source: ../x86-64-gotpcrel-2.s
+#as: --x32 -mrelax-relocations=no
+#objdump: -dwr
+#name: x86-64 (ILP32) gotpcrel (2)
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <foo>:
+ +[a-f0-9]+:	48 8b 05 00 00 00 00 	mov    0x0\(%rip\),%rax        # 7 <foo\+0x7>	3: R_X86_64_GOTPCREL	foo-0x4
+#pass
diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc32.d b/gas/testsuite/gas/i386/mixed-mode-reloc32.d
index a2ef6a0b85..59234bc9be 100644
--- a/gas/testsuite/gas/i386/mixed-mode-reloc32.d
+++ b/gas/testsuite/gas/i386/mixed-mode-reloc32.d
@@ -7,7 +7,7 @@
 
 RELOCATION RECORDS FOR \[.text\]:
 OFFSET[ 	]+TYPE[ 	]+VALUE[ 	]*
-[0-9a-f]+[ 	]+R_386_GOT32X[ 	]+xtrn[ 	]*
+[0-9a-f]+[ 	]+R_386_GOT32[ 	]+xtrn[ 	]*
 [0-9a-f]+[ 	]+R_386_PLT32[ 	]+xtrn[ 	]*
 [0-9a-f]+[ 	]+R_386_GOT32X[ 	]+xtrn[ 	]*
 [0-9a-f]+[ 	]+R_386_PLT32[ 	]+xtrn[ 	]*
diff --git a/gas/testsuite/gas/i386/se1.d b/gas/testsuite/gas/i386/se1.d
index ff2685c781..d7800ab885 100644
--- a/gas/testsuite/gas/i386/se1.d
+++ b/gas/testsuite/gas/i386/se1.d
@@ -10,4 +10,5 @@ Disassembly of section .text:
 0+ <_start>:
 [ 	]*[a-f0-9]+:	0f 01 cf             	encls  
 [ 	]*[a-f0-9]+:	0f 01 d7             	enclu  
+[ 	]*[a-f0-9]+:	0f 01 c0             	enclv  
 #pass
diff --git a/gas/testsuite/gas/i386/se1.s b/gas/testsuite/gas/i386/se1.s
index 1b57ac87fe..92d57952c0 100644
--- a/gas/testsuite/gas/i386/se1.s
+++ b/gas/testsuite/gas/i386/se1.s
@@ -5,3 +5,4 @@ _start:
 
 	encls
 	enclu
+	enclv
diff --git a/gas/testsuite/gas/i386/x86-64-gotpcrel-2.d b/gas/testsuite/gas/i386/x86-64-gotpcrel-2.d
new file mode 100644
index 0000000000..3d07631bd6
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-gotpcrel-2.d
@@ -0,0 +1,11 @@
+#as: -mrelax-relocations=no
+#objdump: -dwr
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <foo>:
+ +[a-f0-9]+:	48 8b 05 00 00 00 00 	mov    0x0\(%rip\),%rax        # 7 <foo\+0x7>	3: R_X86_64_GOTPCREL	foo-0x4
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-gotpcrel-2.s b/gas/testsuite/gas/i386/x86-64-gotpcrel-2.s
new file mode 100644
index 0000000000..db5ddf579a
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-gotpcrel-2.s
@@ -0,0 +1,3 @@
+	.text
+foo:
+	movq	foo@GOTPCREL(%rip), %rax
diff --git a/gas/testsuite/gas/i386/x86-64-se1.d b/gas/testsuite/gas/i386/x86-64-se1.d
index 29494f0090..a515219406 100644
--- a/gas/testsuite/gas/i386/x86-64-se1.d
+++ b/gas/testsuite/gas/i386/x86-64-se1.d
@@ -10,4 +10,5 @@ Disassembly of section .text:
 0+ <_start>:
 [ 	]*[a-f0-9]+:	0f 01 cf             	encls  
 [ 	]*[a-f0-9]+:	0f 01 d7             	enclu  
+[ 	]*[a-f0-9]+:	0f 01 c0             	enclv  
 #pass
diff --git a/gas/testsuite/gas/i386/x86-64-se1.s b/gas/testsuite/gas/i386/x86-64-se1.s
index 1b57ac87fe..92d57952c0 100644
--- a/gas/testsuite/gas/i386/x86-64-se1.s
+++ b/gas/testsuite/gas/i386/x86-64-se1.s
@@ -5,3 +5,4 @@ _start:
 
 	encls
 	enclu
+	enclv
diff --git a/gas/testsuite/gas/i386/xmmword.l b/gas/testsuite/gas/i386/xmmword.l
index ce3af8d150..7d25cb3de2 100644
--- a/gas/testsuite/gas/i386/xmmword.l
+++ b/gas/testsuite/gas/i386/xmmword.l
@@ -99,3 +99,7 @@
 .*:127: Error: .* `vpmovzxwq'
 .*:128: Error: .* `vpmovzxwq'
 .*:129: Error: .* `vpmovzxwq'
+.*:131: Error: .* `vcvtps2qq'
+.*:132: Error: .* `vcvtps2uqq'
+.*:133: Error: .* `vcvttps2qq'
+.*:134: Error: .* `vcvttps2uqq'
diff --git a/gas/testsuite/gas/i386/xmmword.s b/gas/testsuite/gas/i386/xmmword.s
index 47d2d8d595..ffe7aca3cb 100644
--- a/gas/testsuite/gas/i386/xmmword.s
+++ b/gas/testsuite/gas/i386/xmmword.s
@@ -127,3 +127,8 @@ xmmword:
 	vpmovzxwq	xmm0{k7}, xmmword ptr [eax]
 	vpmovzxwq	ymm0, xmmword ptr [eax]
 	vpmovzxwq	ymm0{k7}, xmmword ptr [eax]
+
+	vcvtps2qq	xmm0, xmmword ptr [rax]
+	vcvtps2uqq	xmm0, xmmword ptr [rax]
+	vcvttps2qq	xmm0, xmmword ptr [rax]
+	vcvttps2uqq	xmm0, xmmword ptr [rax]
diff --git a/gas/testsuite/gas/visium/allinsn_gr6.d b/gas/testsuite/gas/visium/allinsn_gr6.d
index bb198eca8e..c7f627bb34 100644
--- a/gas/testsuite/gas/visium/allinsn_gr6.d
+++ b/gas/testsuite/gas/visium/allinsn_gr6.d
@@ -86,10 +86,10 @@ Disassembly of section .text:
  120:	06 a5 1a 02 	asr.w   r6,r5,0
  124:	86 a5 1a 12 	asr.w   r6,r5,1
  128:	86 a7 23 f1 	asr.b   r8,r7,31
- 12c:	0f 89 28 04 	bra     eq,r9,r10
- 130:	07 a0 00 04 	rflag   r0
- 134:	af 87 04 04 	bra     ne,r7,r1
- 138:	07 e0 ae 04 	readmda r11
+ 12c:	07 a0 00 04 	rflag   r0
+ 130:	0f 89 28 04 	bra     eq,r9,r10
+ 134:	07 e0 ae 04 	readmda r11
+ 138:	af 87 04 04 	bra     ne,r7,r1
  13c:	07 e0 b3 f4 	eamread r12,31
  140:	87 cd 30 04 	extb.l  r12,r13
  144:	87 cf 38 02 	extb.w  r14,r15
@@ -130,8 +130,8 @@ Disassembly of section .text:
  1d0:	84 a7 7f ff 	moviu   r7,0x7FFF
  1d4:	04 c6 00 01 	moviq   r6,1
  1d8:	84 47 ff ff 	subi    r7,65535
- 1dc:	ff 86 00 04 	bra     tr,r6,r0
- 1e0:	86 00 00 04 	add.l   r0,r0,r0
+ 1dc:	86 00 00 04 	add.l   r0,r0,r0
+ 1e0:	ff 86 00 04 	bra     tr,r6,r0
  1e4:	d3 e3 84 5c 	fpinst  10,f1,f3,f5
  1e8:	db e4 88 6c 	fpinst  11,f2,f4,f6
  1ec:	7b ed ac fc 	fpinst  15,f11,f13,f15
diff --git a/gas/testsuite/gas/visium/allinsn_gr6.s b/gas/testsuite/gas/visium/allinsn_gr6.s
index 32953fbfb8..11006b836b 100644
--- a/gas/testsuite/gas/visium/allinsn_gr6.s
+++ b/gas/testsuite/gas/visium/allinsn_gr6.s
@@ -93,11 +93,10 @@ sreg:
 	asr.w	r6,r5,1
 	asr.b	r8,r7,31
 
-	bra	eq,r9,r10
 	rflag	r0
-	bra	ne,r7,r1
-
+	bra	eq,r9,r10
 	eamread	r11,0
+	bra	ne,r7,r1
 	eamread	r12,31
 
 	extb.l	r12,r13
@@ -151,8 +150,8 @@ sreg:
 	moviq	r6,1
 	subi	r7,65535
 
-	bra	tr,r6,r0
 	add.l	r0,r0,r0
+	bra	tr,r6,r0
 
 
 	fpinst	10,f1,f3,f5
diff --git a/gas/testsuite/gas/visium/bra-1.d b/gas/testsuite/gas/visium/bra-1.d
new file mode 100644
index 0000000000..483b36bc8f
--- /dev/null
+++ b/gas/testsuite/gas/visium/bra-1.d
@@ -0,0 +1,12 @@
+#as: -mtune=gr6
+#objdump: -d
+#name: bra-1
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <foo>:
+	...
+   8:	ff 95 54 04 	bra     tr,r21,r21
+   c:	00 00 00 00 	nop
diff --git a/gas/testsuite/gas/visium/bra-1.s b/gas/testsuite/gas/visium/bra-1.s
new file mode 100644
index 0000000000..11544b887d
--- /dev/null
+++ b/gas/testsuite/gas/visium/bra-1.s
@@ -0,0 +1,5 @@
+        .text
+foo:
+	nop
+	bra tr,r21,r21
+	 nop
diff --git a/gas/testsuite/gas/visium/visium.exp b/gas/testsuite/gas/visium/visium.exp
index 1451d5865c..659728462d 100644
--- a/gas/testsuite/gas/visium/visium.exp
+++ b/gas/testsuite/gas/visium/visium.exp
@@ -24,6 +24,7 @@ if [istarget visium-*-*] {
     run_dump_test "allinsn_def"
     run_dump_test "allinsn_gr5"
     run_dump_test "allinsn_gr6"
+    run_dump_test "bra-1"
     run_dump_test "brr-1"
     run_dump_test "brr-2"
     run_dump_test "high-1"
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 18af5e69b1..10ebc76325 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,34 @@
+2019-02-18  Nick Clifton  <nickc@redhat.com>
+
+	Import from the mainline:
+	2018-12-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR binutils/23919
+	* merge.cc (Output_merge_string<Char_type>::do_add_input_section):
+	Get addralign from decompressed_section_contents.
+	* object.cc (build_compressed_section_map): Set info.addralign.
+	(Object::decompressed_section_contents): Add a palign
+	argument and store p->second.addralign in *palign if it isn't
+	NULL.
+	* object.h (Compressed_section_info): Add addralign.
+	(section_is_compressed): Add a palign argument, default it
+	to NULL, store p->second.addralign in *palign if it isn't NULL.
+	(Object::decompressed_section_contents): Likewise.
+	* output.cc (Output_section::add_input_section): Get addralign
+	from section_is_compressed.
+
+2018-08-06  Cary Coutant  <ccoutant@gmail.com>
+
+	PR gold/23455
+	* options.h (General_options): Add --warn-drop-version option.
+	* symtab.cc (Symbol_table::set_dynsym_indexes): Check it.
+
+2018-08-06  Cary Coutant  <ccoutant@gmail.com>
+
+	* target.h (Sized_target::record_gnu_property): Change first two
+	parameters to unsigned int.
+	* x86_64.cc (Target_x86_64::record_gnu_property): Likewise.
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
diff --git a/gold/merge.cc b/gold/merge.cc
index de00ee9ae9..d7de11789f 100644
--- a/gold/merge.cc
+++ b/gold/merge.cc
@@ -440,9 +440,11 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
 {
   section_size_type sec_len;
   bool is_new;
+  uint64_t addralign = this->addralign();
   const unsigned char* pdata = object->decompressed_section_contents(shndx,
 								     &sec_len,
-								     &is_new);
+								     &is_new,
+								     &addralign);
 
   const Char_type* p = reinterpret_cast<const Char_type*>(pdata);
   const Char_type* pend = p + sec_len / sizeof(Char_type);
@@ -494,7 +496,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
   // aligned, so each string within the section must retain the same
   // modulo.
   uintptr_t init_align_modulo = (reinterpret_cast<uintptr_t>(pdata)
-				 & (this->addralign() - 1));
+				 & (addralign - 1));
   bool has_misaligned_strings = false;
 
   while (p < pend)
@@ -503,7 +505,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
 
       // Within merge input section each string must be aligned.
       if (len != 0
-	  && ((reinterpret_cast<uintptr_t>(p) & (this->addralign() - 1))
+	  && ((reinterpret_cast<uintptr_t>(p) & (addralign - 1))
 	      != init_align_modulo))
 	  has_misaligned_strings = true;
 
diff --git a/gold/object.cc b/gold/object.cc
index 374340fa16..711793e5e4 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -751,11 +751,13 @@ build_compressed_section_map(
 	      const unsigned char* contents =
 		  obj->section_contents(i, &len, false);
 	      uint64_t uncompressed_size;
+	      Compressed_section_info info;
 	      if (is_zcompressed)
 		{
 		  // Skip over the ".zdebug" prefix.
 		  name += 7;
 		  uncompressed_size = get_uncompressed_size(contents, len);
+		  info.addralign = shdr.get_sh_addralign();
 		}
 	      else
 		{
@@ -763,8 +765,8 @@ build_compressed_section_map(
 		  name += 6;
 		  elfcpp::Chdr<size, big_endian> chdr(contents);
 		  uncompressed_size = chdr.get_ch_size();
+		  info.addralign = chdr.get_ch_addralign();
 		}
-	      Compressed_section_info info;
 	      info.size = convert_to_section_size_type(uncompressed_size);
 	      info.flag = shdr.get_sh_flags();
 	      info.contents = NULL;
@@ -3060,7 +3062,8 @@ const unsigned char*
 Object::decompressed_section_contents(
     unsigned int shndx,
     section_size_type* plen,
-    bool* is_new)
+    bool* is_new,
+    uint64_t* palign)
 {
   section_size_type buffer_size;
   const unsigned char* buffer = this->do_section_contents(shndx, &buffer_size,
@@ -3087,6 +3090,8 @@ Object::decompressed_section_contents(
     {
       *plen = uncompressed_size;
       *is_new = false;
+      if (palign != NULL)
+	*palign = p->second.addralign;
       return p->second.contents;
     }
 
@@ -3108,6 +3113,8 @@ Object::decompressed_section_contents(
   // once in this pass.
   *plen = uncompressed_size;
   *is_new = true;
+  if (palign != NULL)
+    *palign = p->second.addralign;
   return uncompressed_data;
 }
 
diff --git a/gold/object.h b/gold/object.h
index 0b786a5471..b99548463d 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -373,6 +373,7 @@ struct Compressed_section_info
 {
   section_size_type size;
   elfcpp::Elf_Xword flag;
+  uint64_t addralign;
   const unsigned char* contents;
 };
 typedef std::map<unsigned int, Compressed_section_info> Compressed_section_map;
@@ -808,7 +809,8 @@ class Object
 
   bool
   section_is_compressed(unsigned int shndx,
-			section_size_type* uncompressed_size) const
+			section_size_type* uncompressed_size,
+			elfcpp::Elf_Xword* palign = NULL) const
   {
     if (this->compressed_sections_ == NULL)
       return false;
@@ -818,6 +820,8 @@ class Object
       {
 	if (uncompressed_size != NULL)
 	  *uncompressed_size = p->second.size;
+	if (palign != NULL)
+	  *palign = p->second.addralign;
 	return true;
       }
     return false;
@@ -828,7 +832,7 @@ class Object
   // by the caller.
   const unsigned char*
   decompressed_section_contents(unsigned int shndx, section_size_type* plen,
-				bool* is_cached);
+				bool* is_cached, uint64_t* palign = NULL);
 
   // Discard any buffers of decompressed sections.  This is done
   // at the end of the Add_symbols task.
diff --git a/gold/options.h b/gold/options.h
index 98d6be8009..11054981c9 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1361,6 +1361,10 @@ class General_options
   DEFINE_bool_ignore(warn_constructors, options::TWO_DASHES, '\0',
 		     N_("Ignored"), N_("Ignored"));
 
+  DEFINE_bool(warn_drop_version, options::TWO_DASHES, '\0', false,
+	      N_("Warn when discarding version information"),
+	      N_("Do not warn when discarding version information"));
+
   DEFINE_bool(warn_execstack, options::TWO_DASHES, '\0', false,
 	      N_("Warn if the stack is executable"),
 	      N_("Do not warn if the stack is executable"));
diff --git a/gold/output.cc b/gold/output.cc
index 1701db1c99..51836db80e 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -2448,7 +2448,14 @@ Output_section::add_input_section(Layout* layout,
 				  unsigned int reloc_shndx,
 				  bool have_sections_script)
 {
+  section_size_type input_section_size = shdr.get_sh_size();
+  section_size_type uncompressed_size;
   elfcpp::Elf_Xword addralign = shdr.get_sh_addralign();
+
+  if (object->section_is_compressed(shndx, &uncompressed_size,
+                                   &addralign))
+    input_section_size = uncompressed_size;
+
   if ((addralign & (addralign - 1)) != 0)
     {
       object->error(_("invalid alignment %lu for section \"%s\""),
@@ -2498,11 +2505,6 @@ Output_section::add_input_section(Layout* layout,
 	}
     }
 
-  section_size_type input_section_size = shdr.get_sh_size();
-  section_size_type uncompressed_size;
-  if (object->section_is_compressed(shndx, &uncompressed_size))
-    input_section_size = uncompressed_size;
-
   off_t offset_in_section;
 
   if (this->has_fixed_layout())
diff --git a/gold/symtab.cc b/gold/symtab.cc
index aa7644156f..759e0d0222 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -2623,11 +2623,12 @@ Symbol_table::set_dynsym_indexes(unsigned int index,
 		versions->record_version(this, dynpool, sym);
 	      else
 		{
-		  gold_warning(_("discarding version information for "
-				 "%s@%s, defined in unused shared library %s "
-				 "(linked with --as-needed)"),
-			       sym->name(), sym->version(),
-			       sym->object()->name().c_str());
+		  if (parameters->options().warn_drop_version())
+		    gold_warning(_("discarding version information for "
+				   "%s@%s, defined in unused shared library %s "
+				   "(linked with --as-needed)"),
+				 sym->name(), sym->version(),
+				 sym->object()->name().c_str());
 		  sym->clear_version();
 		}
 	    }
diff --git a/gold/target.h b/gold/target.h
index bb312067b5..bbc87396f6 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -1147,7 +1147,8 @@ class Sized_target : public Target
   // Record a target-specific program property in the .note.gnu.property
   // section.
   virtual void
-  record_gnu_property(int, int, size_t, const unsigned char*, const Object*)
+  record_gnu_property(unsigned int, unsigned int, size_t,
+		      const unsigned char*, const Object*)
   { }
 
   // Merge the target-specific program properties from the current object.
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 27f273d64b..9d742f6f13 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -1307,7 +1307,8 @@ class Target_x86_64 : public Sized_target<size, false>
   // Record a target-specific program property in the .note.gnu.property
   // section.
   void
-  record_gnu_property(int, int, size_t, const unsigned char*, const Object*);
+  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
@@ -1579,7 +1580,7 @@ Target_x86_64<size>::rela_irelative_section(Layout* layout)
 template<int size>
 void
 Target_x86_64<size>::record_gnu_property(
-    int, int pr_type,
+    unsigned int, unsigned int pr_type,
     size_t pr_datasz, const unsigned char* pr_data,
     const Object* object)
 {
diff --git a/include/ChangeLog b/include/ChangeLog
index 7decb4fd7b..e0b82bc338 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2018-11-15  Claudiu Zissulescu  <claziss@synopsys.com>
+
+	Backport from mainline
+	2018-08-01  Cupertino Miranda <cmiranda@synopsys.com>
+	* arc-reloc.def (ARC_TLS_LE_32): Updated reloc formula.
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
diff --git a/include/elf/arc-reloc.def b/include/elf/arc-reloc.def
index a6db724da9..61edd6e67a 100644
--- a/include/elf/arc-reloc.def
+++ b/include/elf/arc-reloc.def
@@ -468,7 +468,7 @@ ARC_RELOC_HOWTO(ARC_TLS_DTPOFF, 67, \
                 32, \
                 replace_word32, \
                 dont, \
-                ( ME ( S - SECTSTART ) + A ))
+		( ME ( S - FINAL_SECTSTART ) + A ))
 
 ARC_RELOC_HOWTO(ARC_TLS_DTPOFF_S9, 73, \
                 2, \
@@ -489,7 +489,7 @@ ARC_RELOC_HOWTO(ARC_TLS_LE_32, 75, \
                 32, \
                 replace_word32, \
                 dont, \
-                ( ME ( ( ( ( S + A ) + TCB_SIZE ) - TLS_REL ) ) ))
+		( ME ( ( ( ( S + A ) + TLS_TBSS ) - TLS_REL ) ) ))
 
 ARC_RELOC_HOWTO(ARC_S25W_PCREL_PLT, 76, \
                 2, \
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c07e442c84..00c0785ede 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,146 @@
+2019-02-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/24151
+	* testsuite/ld-x86-64/pr24151a-x32.d: New file.
+	* testsuite/ld-x86-64/pr24151a.d: Likewise.
+	* testsuite/ld-x86-64/pr24151a.s: Likewise.
+	* testsuite/ld-x86-64/x86-64.exp: Run pr24151a and pr24151a-x32.
+
+2019-01-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+	* testsuite/ld-ifunc/ifunc.exp: Skip pr23169 on SPARC.
+
+2018-11-30  Alan Modra  <amodra@gmail.com>
+
+	* testsuite/ld-powerpc/pr23937.d,
+	* testsuite/ld-powerpc/pr23937.s: New test.
+	* testsuite/ld-powerpc/powerpc.exp: Run it.
+
+2018-11-27  Tamar Christina  <tamar.christina@arm.com>
+
+	PR ld/23904
+	* testsuite/ld-aarch64/aarch64-elf.exp: Add erratum843419_tls_ie.
+	* testsuite/ld-aarch64/erratum843419_tls_ie.d: New test.
+	* testsuite/ld-aarch64/erratum843419_tls_ie.s: New test.
+
+2018-11-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/23854
+	* testsuite/ld-i386/i386.exp: Run pr23854.
+	* testsuite/ld-x86-64/x86-64.exp: Likewwise.
+	* testsuite/ld-i386/pr23854.d: New file.
+	* testsuite/ld-i386/pr23854.s: Likewwise.
+	* testsuite/ld-i386/pr23854.d: Likewwise.
+	* testsuite/ld-x86-64/pr23854.d: Likewwise.
+	* testsuite/ld-x86-64/pr23854.s: Likewwise.
+
+2018-11-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23818
+	* testsuite/ld-plugin/lto.exp: Run PR ld/23818 test.
+	* testsuite/ld-plugin/pr23818.d: New file.
+	* testsuite/ld-plugin/pr23818.t: Likewise.
+	* testsuite/ld-plugin/pr23818a.c: Likewise.
+	* testsuite/ld-plugin/pr23818b.c: Likewise.
+
+2018-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-x86-64/pr23486b.d: Swap pr23486a.s and pr23486a.s.
+
+2018-08-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23428
+	* testsuite/ld-elf/dummy.s: New file.
+	* testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property.
+	* testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428.
+
+2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23486
+	* testsuite/ld-i386/i386.exp: Run PR ld/23486 tests.
+	* testsuite/ld-x86-64/x86-64.exp: Likewise.
+	* testsuite/ld-i386/pr23486a.d: New file.
+	* testsuite/ld-i386/pr23486b.d: Likewise.
+	* testsuite/ld-x86-64/pr23486a-x32.d: Likewise.
+	* testsuite/ld-x86-64/pr23486a.d: Likewise.
+	* testsuite/ld-x86-64/pr23486a.s: Likewise.
+	* testsuite/ld-x86-64/pr23486b-x32.d: Likewise.
+	* testsuite/ld-x86-64/pr23486b.d: Likewise.
+	* testsuite/ld-x86-64/pr23486b.s: Likewise.
+	* testsuite/ld-i386/property-3.r: Remove "x86 ISA used".
+	* testsuite/ld-i386/property-4.r: Likewise.
+	* testsuite/ld-i386/property-5.r: Likewise.
+	* testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
+	* testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
+	* testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
+	* testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
+	* testsuite/ld-x86-64/property-3.r: Likewise.
+	* testsuite/ld-x86-64/property-4.r: Likewise.
+	* testsuite/ld-x86-64/property-5.r: Likewise.
+	* testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
+	* testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.
+
+2018-08-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-x86-64/property-x86-3.s: Use ".p2align 2" to
+	align .note.gnu.property section if __64_bit__ is undefined.
+
+2018-08-01  Alan Modra  <amodra@gmail.com>
+
+	* testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with hash-style
+	specified.
+
+2018-08-01  Alan Modra  <amodra@gmail.com>
+
+	* testsuite/ld-powerpc/powerpc.exp: Run tlsopt5 with plt alignment.
+	* testsuite/ld-powerpc/tlsopt5.s: Add extra call.
+	* testsuite/ld-powerpc/tlsopt5.wf: Adjust expected output.
+	* testsuite/ld-powerpc/tlsopt5.d: Likewise.
+
+2018-08-07  Nick Clifton  <nickc@redhat.com>
+
+	* po/bg.po: Updated Bulgarian translation.
+
+2018-08-01  Roland McGrath  <mcgrathr@google.com>
+
+	* testsuite/ld-aarch64/ifunc-1-local.d: Adjust regexps to match
+	the offsets emitted by aarch64-elf configurations.
+	* testsuite/ld-aarch64/ifunc-1.d: Likewise.
+	* testsuite/ld-aarch64/ifunc-2-local.d: Likewise.
+	* testsuite/ld-aarch64/ifunc-2.d: Likewise.
+	* testsuite/ld-aarch64/ifunc-21.d: Likewise.
+	* testsuite/ld-aarch64/ifunc-3a.d: Likewise.
+
+2018-07-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23428
+	* testsuite/ld-elf/linux-x86.S: New file.
+	* testsuite/ld-elf/linux-x86.exp: Likewise.
+	* testsuite/ld-elf/pr23428.c: Likewise.
+	* testsuite/ld-elf/sec64k.exp: Pass "-z noseparate-code" to ld
+	for Linux/x86 targets.
+	* testsuite/ld-i386/abs-iamcu.d: Likewise.
+	* testsuite/ld-i386/abs.d: Likewise.
+	* testsuite/ld-i386/pr12718.d: Likewise.
+	* testsuite/ld-i386/pr12921.d: Likewise.
+	* testsuite/ld-x86-64/abs-k1om.d: Likewise.
+	* testsuite/ld-x86-64/abs-l1om.d: Likewise.
+	* testsuite/ld-x86-64/abs.d: Likewise.
+	* testsuite/ld-x86-64/pr12718.d: Likewise.
+	* testsuite/ld-x86-64/pr12921.d: Likewise.
+	* testsuite/ld-linkonce/zeroeh.ld: Discard .note.gnu.property
+	section.
+	* testsuite/ld-scripts/print-memory-usage.t: Likewise.
+	* testsuite/ld-scripts/size-2.t: Likewise.
+	* testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use ld to
+	create executable if language is "asm".
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
diff --git a/ld/po/bg.po b/ld/po/bg.po
index 5e8e818818..bf6ecd9b61 100644
--- a/ld/po/bg.po
+++ b/ld/po/bg.po
@@ -13,7 +13,7 @@ msgstr ""
 "Project-Id-Version: ld 2.30.90\n"
 "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
 "POT-Creation-Date: 2018-06-24 19:43+0100\n"
-"PO-Revision-Date: 2018-06-28 22:58+0300\n"
+"PO-Revision-Date: 2018-07-26 20:34+0300\n"
 "Last-Translator: Румен Петров <transl@roumenpetrov.info>\n"
 "Language-Team: Bulgarian <dict@ludost.net>\n"
 "Language: bg\n"
@@ -33,7 +33,7 @@ msgstr "%X%P: cref_hash_lookup не успя: %E\n"
 
 #: ldcref.c:186
 msgid "%X%P: cref alloc failed: %E\n"
-msgstr "%X%P: пропадна заделяне(на памет) за cref: %E\n"
+msgstr "%X%P: не успя заделянето на памет в cref: %E\n"
 
 #: ldcref.c:371
 #, c-format
@@ -62,7 +62,7 @@ msgstr "Без имена\n"
 
 #: ldcref.c:413 ldcref.c:565
 msgid "%P: symbol `%pT' missing from main hash table\n"
-msgstr "%P: име '%pT' липсва в главната хеш-таблица\n"
+msgstr "%P: в главния речник липсва името '%pT'\n"
 
 #: ldcref.c:517 ldcref.c:628 ldmain.c:1211 ldmisc.c:335 pe-dll.c:715
 #: pe-dll.c:1296 pe-dll.c:1417 pe-dll.c:1535 earm_wince_pe.c:1430
@@ -87,7 +87,7 @@ msgstr "%X%P: %C: забранено е кръстосана отпратка о
 
 #: ldctor.c:83
 msgid "%X%P: different relocs used in set %s\n"
-msgstr "%X%P: различни \"преместванията\" се използват в множеството %s\n"
+msgstr "%X%P: различни \"премествания\" се използват в набора %s\n"
 
 #: ldctor.c:101
 msgid "%X%P: different object file formats composing set %s\n"
@@ -103,7 +103,7 @@ msgstr "%X%P: раздел %s не поддържа преместване %s з
 
 #: ldctor.c:321
 msgid "%X%P: unsupported size %d for set %s\n"
-msgstr "%X%P: неподдържан размер %d за множеството %s\n"
+msgstr "%X%P: неподдържан размер %d за набор %s\n"
 
 #: ldctor.c:344
 msgid ""
@@ -202,7 +202,7 @@ msgstr "%F%P:%pS не може да се върне обратно брояч н
 
 #: ldexp.c:1167
 msgid "%F%P:%s: hash creation failed\n"
-msgstr "%F%P:%s: пропадна създаването на хеш\n"
+msgstr "%F%P:%s: не успя създаването на хеш\n"
 
 #: ldexp.c:1519 ldexp.c:1545 ldexp.c:1605
 msgid "%F%P:%pS: nonconstant expression for %s\n"
@@ -210,7 +210,7 @@ msgstr "%F%P:%pS: не е константен изразът за %s\n"
 
 #: ldexp.c:1631 ldlang.c:1234 ldlang.c:3187 ldlang.c:7174
 msgid "%F%P: can not create hash table: %E\n"
-msgstr "%F%P: не може да се създаде хеш-таблицата: %E\n"
+msgstr "%F%P: не може да се създаде речник: %E\n"
 
 #: ldfile.c:132 eaarch64cloudabi.c:656 eaarch64cloudabib.c:656
 #: eaarch64elf.c:656 eaarch64elf32.c:656 eaarch64elf32b.c:656
@@ -286,12 +286,12 @@ msgstr "%F%P: не може да се създаде хеш-таблицата:
 #: eshlelf_vxworks.c:370 ev850.c:387 ev850_rh850.c:387 exgateelf.c:341
 #, c-format
 msgid "attempt to open %s failed\n"
-msgstr "опита да се отвори %s не успя\n"
+msgstr "опитът да се отвори %s не успя\n"
 
 #: ldfile.c:134
 #, c-format
 msgid "attempt to open %s succeeded\n"
-msgstr "опита да се отвори %s успя\n"
+msgstr "опитът да се отвори %s успя\n"
 
 #: ldfile.c:140
 msgid "%F%P: invalid BFD target `%s'\n"
@@ -353,7 +353,7 @@ msgstr "%F%P:%pS: грешка: синоним за област памет по
 
 #: ldlang.c:1372
 msgid "%F%P:%pS: error: redefinition of memory region alias `%s'\n"
-msgstr "%F%P:%pS: грешка: повторен определение на синоним за област памет '%s'\n"
+msgstr "%F%P:%pS: грешка: повторено определение на синоним за област памет '%s'\n"
 
 #: ldlang.c:1379
 msgid "%F%P:%pS: error: memory region `%s' for alias `%s' does not exist\n"
@@ -361,7 +361,7 @@ msgstr "%F%P:%pS: грешка: област памет '%s' за синоним
 
 #: ldlang.c:1438 ldlang.c:1477
 msgid "%F%P: failed creating section `%s': %E\n"
-msgstr "%F%P: пропадна създаването на раздел '%s': %E\n"
+msgstr "%F%P: не успя създаването на раздел '%s': %E\n"
 
 #: ldlang.c:1998
 msgid ""
@@ -439,7 +439,7 @@ msgstr "%F%P: %pB: файлът не е разпознат: %E\n"
 
 #: ldlang.c:2854
 msgid "%F%P: %pB: member %pB in archive is not an object\n"
-msgstr "%F%P: %pB: членът, на архива %pB, не е обект\n"
+msgstr "%F%P: %pB: членът на архива %pB не е обект\n"
 
 #: ldlang.c:2869 ldlang.c:2883 eaarch64cloudabi.c:776 eaarch64cloudabib.c:776
 #: eaarch64elf.c:776 eaarch64elf32.c:776 eaarch64elf32b.c:776
@@ -518,7 +518,7 @@ msgstr "%F%P: %pB: грешка при добавяне на имената: %E\
 
 #: ldlang.c:3157
 msgid "%P: warning: could not find any targets that match endianness requirement\n"
-msgstr "%P: предупреждение: не може да се открие резултат, който да отговаря на изискванията за подредба(на байтовете)\n"
+msgstr "%P: предупреждение: не може да се открие резултат, който да отговаря на изискванията за подредба на байтовете\n"
 
 #: ldlang.c:3171
 msgid "%F%P: target %s not found\n"
@@ -546,7 +546,7 @@ msgstr "%X%P: не е определено задължителното име '
 
 #: ldlang.c:3770
 msgid "%F%P: %s not found for insert\n"
-msgstr "%F%P: %s не е намерен(за добавяне)\n"
+msgstr "%F%P: %s не е намерен за добавяне\n"
 
 #: ldlang.c:4011
 msgid " load address 0x%V"
@@ -598,7 +598,7 @@ msgstr "%X%P: %pB раздел '%s' не се побира в област '%s'\
 
 #: ldlang.c:5050
 msgid "%F%P:%pS: non constant or forward reference address expression for section %s\n"
-msgstr "%F%P:%pS: адресния израз не е константен или отпратка за по нататък при раздел %s\n"
+msgstr "%F%P:%pS: адресният израз не е константен или е отпратка за по нататък при раздел %s\n"
 
 #: ldlang.c:5075
 msgid "%X%P: internal error on COFF shared library section %s\n"
@@ -664,7 +664,7 @@ msgstr "%X%P: %s архитектурата на входен файл '%pB' е
 
 #: ldlang.c:6332
 msgid "%X%P: failed to merge target specific data of file %pB\n"
-msgstr "%X%P: пропадна сливането, на специфични за резултата данни, от файл %pB\n"
+msgstr "%X%P: не успя сливането на целеви данни от файл %pB\n"
 
 #: ldlang.c:6403
 msgid "%F%P: could not define common symbol `%pT': %E\n"
@@ -704,7 +704,7 @@ msgstr "%F%P:%pS: грешка: зададено е подравняване с
 
 #: ldlang.c:7198
 msgid "%F%P: %s: plugin reported error after all symbols read\n"
-msgstr "%F%P: %s: приставката рапортува грешка, след прочитане на всички имена\n"
+msgstr "%F%P: %s: приставката отчете грешка след прочитане на всички имена\n"
 
 #: ldlang.c:7602
 msgid "%F%P: multiple STARTUP files\n"
@@ -805,11 +805,11 @@ msgstr "%P: грешка при свързване, изтриване на из
 
 #: ldmain.c:490
 msgid "%F%P: %pB: final close failed: %E\n"
-msgstr "%F%P: %pB: пропадна заключителното затваряне: %E\n"
+msgstr "%F%P: %pB: не успя заключителното затваряне: %E\n"
 
 #: ldmain.c:517
 msgid "%F%P: unable to open for source of copy `%s'\n"
-msgstr "%F%P: не можа да се отвори източника на копието '%s'\n"
+msgstr "%F%P: не можа да се отвори източникът на копието '%s'\n"
 
 #: ldmain.c:520
 msgid "%F%P: unable to open for destination of copy `%s'\n"
@@ -1017,7 +1017,7 @@ msgstr "%P: вътрешна грешка: прекратяване на %s:%d\n
 
 #: ldmisc.c:703
 msgid "%F%P: please report this bug\n"
-msgstr "%F%P: моля, рапортувайте този проблем\n"
+msgstr "%F%P: моля, докладвайте този проблем\n"
 
 #. Output for noisy == 2 is intended to follow the GNU standards.
 #: ldver.c:37
@@ -1048,7 +1048,7 @@ msgstr "  Поддържани подражавания:\n"
 
 #: ldwrite.c:60 ldwrite.c:206 ldwrite.c:258 ldwrite.c:299
 msgid "%F%P: bfd_new_link_order failed\n"
-msgstr "%F%P: пропадна bfd_new_link_order\n"
+msgstr "%F%P: bfd_new_link_order не успя\n"
 
 #: ldwrite.c:368
 msgid "%F%P: cannot create split section name for %s\n"
@@ -1056,7 +1056,7 @@ msgstr "%F%P: при разцепване на раздел, не можа да
 
 #: ldwrite.c:380
 msgid "%F%P: clone section failed: %E\n"
-msgstr "%F%P: пропадна копирането на раздел: %E\n"
+msgstr "%F%P: не успя раздвояването на раздел: %E\n"
 
 #: ldwrite.c:418
 #, c-format
@@ -1065,7 +1065,7 @@ msgstr "%8x други\n"
 
 #: ldwrite.c:588
 msgid "%F%P: final link failed: %E\n"
-msgstr "%F%P: пропадна заключителното свързване: %E\n"
+msgstr "%F%P: не успя заключителното свързване: %E\n"
 
 #: lexsup.c:102 lexsup.c:276
 msgid "KEYWORD"
@@ -1490,7 +1490,7 @@ msgstr ""
 
 #: lexsup.c:350
 msgid "Set default hash table size close to <NUMBER>"
-msgstr "Установява размер по подразбиране на таблицат за хеш близък до <ЧИСЛО>"
+msgstr "Установява размер, по подразбиране, на речника близък до <ЧИСЛО>"
 
 #: lexsup.c:353
 msgid "Print option help"
@@ -1776,15 +1776,15 @@ msgstr "Предупреждение, ако споделен обект съд
 
 #: lexsup.c:518
 msgid "Warn if an object has alternate ELF machine code"
-msgstr "Предупреждение ако обекта е с друг ELF ELF код за машина"
+msgstr "Предупреждение, ако обекта е с друг ELF код за машина"
 
 #: lexsup.c:522
 msgid "Report unresolved symbols as warnings"
-msgstr "Рапортуване като предупреждения, на несвързани имена"
+msgstr "Докладване на несвързани имена като предупреждения"
 
 #: lexsup.c:525
 msgid "Report unresolved symbols as errors"
-msgstr "Рапортуване, като грешки, на несвързани имена"
+msgstr "Докладване на несвързани имена като грешки"
 
 #: lexsup.c:527
 msgid "Include all objects from following archives"
@@ -2332,12 +2332,12 @@ msgstr "%X%P: не може да се създаде раздел .reloc: %E\n"
 #: pe-dll.c:1100
 #, c-format
 msgid "%X%P: error: ordinal used twice: %d (%s vs %s)\n"
-msgstr "%X%P: грешка, номера е използван два пъти: %d (%s с/у %s)\n"
+msgstr "%X%P: грешка, номерът е използван два пъти: %d (%s с/у %s)\n"
 
 #: pe-dll.c:1136
 #, c-format
 msgid "%X%P: error: export ordinal too large: %d\n"
-msgstr "%X%P: грешка: номера е твърде голям: %d\n"
+msgstr "%X%P: грешка: номерът е твърде голям: %d\n"
 
 #: pe-dll.c:1452
 #, c-format
@@ -2346,7 +2346,7 @@ msgstr "Сведение: разрешаване на %s със свързван
 
 #: pe-dll.c:1458
 msgid "%P: warning: auto-importing has been activated without --enable-auto-import specified on the command line; this should work unless it involves constant data structures referencing symbols from auto-imported DLLs\n"
-msgstr "%P: предупреждение: автоматично внасяне е задействано без да се зададе --enable-auto-import на командния ред.Това работи, освен ако не е свързано с константни структури за данни, които указват към имена от автоматично внасяни DLL-ли.\n"
+msgstr "%P: предупреждение: автоматично внасяне е задействано без да се зададе --enable-auto-import на командния ред. Това работи, освен ако не е свързано с константни структури за данни, които указват към имена от автоматично внасяни DLL-ли.\n"
 
 #. Huh?  Shouldn't happen, but punt if it does.
 #: pe-dll.c:1527
@@ -2370,7 +2370,7 @@ msgstr "; липсва съдържание\n"
 
 #: pe-dll.c:2780
 msgid "%X%P: %C: variable '%pT' can't be auto-imported; please read the documentation for ld's --enable-auto-import for details\n"
-msgstr "%X%P: %C: променливата '%pT' не може да се внесе автоматично. Да се прочете в документацията на свързващата програма за повече сведения относно --enable-auto-import.\n"
+msgstr "%X%P: %C: променливата '%pT' не може да се внесе автоматично. Да се провери в документацията на свързващата програма за повече сведения относно --enable-auto-import.\n"
 
 #: pe-dll.c:2807
 #, c-format
@@ -2469,7 +2469,7 @@ msgstr "%F%P: приставката не можа да задели памет
 
 #: plugin.c:1138
 msgid "%F%P: %s: plugin reported error claiming file\n"
-msgstr "%F%P: %s: приставката рапортува грешка, при твърденията за файла\n"
+msgstr "%F%P: %s: приставката отчете грешка при твърденията за файла\n"
 
 #: plugin.c:1248
 msgid "%P: %s: error in plugin cleanup: %d (ignored)\n"
@@ -2547,7 +2547,7 @@ msgstr "%P: %s: грешка при почистване на приставка
 #: eshlelf_nto.c:81 eshlelf_vxworks.c:81 ev850.c:81 ev850_rh850.c:81
 #: exgateelf.c:81
 msgid "%F%P: map sections to segments failed: %E\n"
-msgstr "%F%P: пропадна свързването на раздел към част: %E\n"
+msgstr "%F%P: не успя свързването на раздел към част: %E\n"
 
 #: eaarch64cloudabi.c:101 eaarch64cloudabib.c:101 eaarch64elf.c:101
 #: eaarch64elf32.c:101 eaarch64elf32b.c:101 eaarch64elfb.c:101
@@ -5051,31 +5051,31 @@ msgstr "%F%P: не се чете %s\n"
 
 #: eaix5ppc.c:390 eaix5rs6.c:390 eaixppc.c:390 eaixrs6.c:390 eppcmacos.c:390
 msgid "%P: warning: ignoring invalid -D number %s\n"
-msgstr "%P: предупреждение: изоставяне на неправилно число за -D %s\n"
+msgstr "%P: предупреждение: пропускане на неправилно число за -D %s\n"
 
 #: eaix5ppc.c:398 eaix5rs6.c:398 eaixppc.c:398 eaixrs6.c:398 eppcmacos.c:398
 msgid "%P: warning: ignoring invalid -H number %s\n"
-msgstr "%P: предупреждение: изоставяне на неправилно число за -H %s\n"
+msgstr "%P: предупреждение: пропускане на неправилно число за -H %s\n"
 
 #: eaix5ppc.c:510 eaix5rs6.c:510 eaixppc.c:510 eaixrs6.c:510 eppcmacos.c:510
 msgid "%P: warning: ignoring invalid -bmaxdata number %s\n"
-msgstr "%P: предупреждение: изоставяне на неправилно число за -bmaxdata %s\n"
+msgstr "%P: предупреждение: пропускане на неправилно число за -bmaxdata %s\n"
 
 #: eaix5ppc.c:519 eaix5rs6.c:519 eaixppc.c:519 eaixrs6.c:519 eppcmacos.c:519
 msgid "%P: warning: ignoring invalid -bmaxstack number %s\n"
-msgstr "%P: предупреждение: изоставяне на неправилно число за -bmaxstack %s\n"
+msgstr "%P: предупреждение: пропускане на неправилно число за -bmaxstack %s\n"
 
 #: eaix5ppc.c:532 eaix5rs6.c:532 eaixppc.c:532 eaixrs6.c:532 eppcmacos.c:532
 msgid "%P: warning: ignoring invalid module type %s\n"
-msgstr "%P: предупреждение: изоставяне на неправиен тип на модул %s\n"
+msgstr "%P: предупреждение: пропускане на неправиен тип на модул %s\n"
 
 #: eaix5ppc.c:562 eaix5rs6.c:562 eaixppc.c:562 eaixrs6.c:562 eppcmacos.c:562
 msgid "%P: warning: ignoring invalid -pD number %s\n"
-msgstr "%P: предупреждение: изоставяне на неправилно число за -pD %s\n"
+msgstr "%P: предупреждение: пропускане на неправилно число за -pD %s\n"
 
 #: eaix5ppc.c:585 eaix5rs6.c:585 eaixppc.c:585 eaixrs6.c:585 eppcmacos.c:585
 msgid "%P: warning: ignoring invalid -pT number %s\n"
-msgstr "%P: предупреждение: изоставяне на неправилно число за -pT %s\n"
+msgstr "%P: предупреждение: пропускане на неправилно число за -pT %s\n"
 
 #: eaix5ppc.c:714 eaix5rs6.c:714 eaixppc.c:714 eaixrs6.c:714 eppcmacos.c:714
 msgid "%F%P: bfd_xcoff_link_record_set failed: %E\n"
@@ -5252,7 +5252,7 @@ msgstr "  --[no-]leading-underscore          Изрично установява
 #: emcorepe.c:392 eppcpe.c:392 eshpe.c:392
 #, c-format
 msgid "  --thumb-entry=<symbol>             Set the entry point to be Thumb <symbol>\n"
-msgstr "  --thumb-entry=<знак>               Установяване на входяща точка да е отбелязания <знак>\n"
+msgstr "  --thumb-entry=<знак>               Установяване на входяща точка на отбелязания <знак>\n"
 
 #: earm_wince_pe.c:393 earmpe.c:393 ei386pe.c:393 ei386pe_posix.c:393
 #: emcorepe.c:393 eppcpe.c:393 eshpe.c:393
@@ -5264,7 +5264,7 @@ msgstr "  --[no-]insert-timestamp            Използва истинска 
 #: ei386pep.c:375 emcorepe.c:394 eppcpe.c:394 eshpe.c:394
 #, c-format
 msgid "                                     This makes binaries non-deterministic\n"
-msgstr "                                     Това прави двоичните файлове неопределяеми\n"
+msgstr "                                     Това прави двоичните файлове несравними\n"
 
 #: earm_wince_pe.c:396 earmpe.c:396 ei386pe.c:396 ei386pe_posix.c:396
 #: ei386pep.c:377 emcorepe.c:396 eppcpe.c:396 eshpe.c:396
@@ -5440,7 +5440,7 @@ msgid ""
 "                                       greater than 2 gigabytes\n"
 msgstr ""
 "  --large-address-aware              Програмата поддържа виртуални адреси\n"
-"                                       по-голями от 2 гигабайта\n"
+"                                       по-големи от 2 гигабайта\n"
 
 #: earm_wince_pe.c:420 earmpe.c:420 ei386pe.c:420 ei386pe_posix.c:420
 #: emcorepe.c:420 eppcpe.c:420 eshpe.c:420
@@ -5450,7 +5450,7 @@ msgid ""
 "                                       addresses greater than 2 gigabytes\n"
 msgstr ""
 "  --disable-large-address-aware      Програмата не поддържа виртуални\n"
-"                                       адреси по-голями от 2 гигабайта\n"
+"                                       адреси по-големи от 2 гигабайта\n"
 
 #: earm_wince_pe.c:421 earmpe.c:421 ei386pe.c:421 ei386pe_posix.c:421
 #: ei386pep.c:399 emcorepe.c:421 eppcpe.c:421 eshpe.c:421
@@ -5479,7 +5479,7 @@ msgid ""
 "  --dynamicbase                      Image base address may be relocated using\n"
 "                                       address space layout randomization (ASLR)\n"
 msgstr ""
-"  --dynamicbase                      Основния адрес на образа може да бъде преместен\n"
+"  --dynamicbase                      Основният адрес на образа може да бъде преместен\n"
 "                                       като се използва случаен адрес\n"
 
 #: earm_wince_pe.c:424 earmpe.c:424 ei386pe.c:424 ei386pe_posix.c:424
@@ -5492,13 +5492,13 @@ msgstr "  --forceinteg               Налагане на проверка за
 #: ei386pep.c:404 emcorepe.c:425 eppcpe.c:425 eshpe.c:425
 #, c-format
 msgid "  --nxcompat                 Image is compatible with data execution prevention\n"
-msgstr "  --nxcompat                 Образа е съвместим с предотвратяване на изпълнение на данни\n"
+msgstr "  --nxcompat                 Образът е съвместим с предотвратяване на изпълнение на данни\n"
 
 #: earm_wince_pe.c:426 earmpe.c:426 ei386pe.c:426 ei386pe_posix.c:426
 #: ei386pep.c:405 emcorepe.c:426 eppcpe.c:426 eshpe.c:426
 #, c-format
 msgid "  --no-isolation             Image understands isolation but do not isolate the image\n"
-msgstr "  --no-isolation             Образа поддържа изолиране, но да не се изолира\n"
+msgstr "  --no-isolation             Образът поддържа изолиране, но да не се изолира\n"
 
 #: earm_wince_pe.c:427 earmpe.c:427 ei386pe.c:427 ei386pe_posix.c:427
 #: emcorepe.c:427 eppcpe.c:427 eshpe.c:427
@@ -5507,7 +5507,7 @@ msgid ""
 "  --no-seh                   Image does not use SEH. No SE handler may\n"
 "                                       be called in this image\n"
 msgstr ""
-"  --no-seh                   Образа не използва SEH. В този образ не\n"
+"  --no-seh                   Образът не използва SEH. В този образ не\n"
 "                               може да се извиква SE подръжка\n"
 
 #: earm_wince_pe.c:428 earmpe.c:428 ei386pe.c:428 ei386pe_posix.c:428
@@ -5526,7 +5526,7 @@ msgstr "  --wdmdriver                Използване на WDM модел з
 #: ei386pep.c:409 emcorepe.c:430 eppcpe.c:430 eshpe.c:430
 #, c-format
 msgid "  --tsaware                  Image is Terminal Server aware\n"
-msgstr "  --tsaware                  Образа поддържа \"Terminal Server\"\n"
+msgstr "  --tsaware                  Образът поддържа \"Terminal Server\"\n"
 
 #: earm_wince_pe.c:431 earmpe.c:431 ei386pe.c:431 ei386pe_posix.c:431
 #: ei386pep.c:410 emcorepe.c:431 eppcpe.c:431 eshpe.c:431
@@ -5603,7 +5603,7 @@ msgstr ""
 #: earm_wince_pe.c:1302 earmpe.c:1302 ei386pe.c:1302 ei386pe_posix.c:1302
 #: ei386pep.c:1305 emcorepe.c:1302 eppcpe.c:1302 eshpe.c:1302
 msgid "%F%P: cannot perform PE operations on non PE output file '%pB'\n"
-msgstr "%F%P: не може да се извърши \"PE\"-операции на изходен файл '%pB', който не е \"PE\"\n"
+msgstr "%F%P: не може да се извършат \"PE\"-операции на изходен файл '%pB', който не е \"PE\"\n"
 
 #: earm_wince_pe.c:1442 earmpe.c:1442 ei386pe.c:1442 ei386pe_posix.c:1442
 #: ei386pep.c:1426 emcorepe.c:1442 eppcpe.c:1442 eshpe.c:1442
@@ -5649,7 +5649,7 @@ msgstr "%P: предупреждение: '--thumb-entry %s' прегазва '-
 #: earmnto.c:577 earmpe.c:1876 earmsymbian.c:577 ei386pe.c:1876
 #: ei386pe_posix.c:1876 emcorepe.c:1876 eppcpe.c:1876 eshpe.c:1876
 msgid "%P: warning: cannot find thumb start symbol %s\n"
-msgstr "%P: предупреждение: не е намерен, като начален, отбелязания знак %s\n"
+msgstr "%P: предупреждение: не е намерен, като начален, отбелязаният знак %s\n"
 
 #: earmelf.c:603 earmelf_fbsd.c:603 earmelf_fuchsia.c:603 earmelf_linux.c:603
 #: earmelf_linux_eabi.c:603 earmelf_linux_fdpiceabi.c:603 earmelf_nacl.c:603
@@ -5700,7 +5700,7 @@ msgstr "%P: неразпознат вид STM32L4XX поправка '%s'\n"
 #: earmelfb_nacl.c:2851 earmelfb_nbsd.c:2851 earmnto.c:2826 earmsymbian.c:2851
 #, c-format
 msgid "  --thumb-entry=<sym>         Set the entry point to be Thumb symbol <sym>\n"
-msgstr "  --thumb-entry=<знак>        Установява входяща точка да е отбелязания <знак>\n"
+msgstr "  --thumb-entry=<знак>        Установява входяща точка на отбелязания <знак>\n"
 
 #: earmelf.c:2852 earmelf_fbsd.c:2859 earmelf_fuchsia.c:2852
 #: earmelf_linux.c:2852 earmelf_linux_eabi.c:2852
@@ -6667,7 +6667,7 @@ msgstr ""
 
 #: eelf32xtensa.c:561
 msgid "%F%P: failed to create .xtensa.info section\n"
-msgstr "%F%P: пропадна създаването на раздел .xtensa.info\n"
+msgstr "%F%P: не успя създаването на раздел .xtensa.info\n"
 
 #: eelf32xtensa.c:4073
 #, c-format
@@ -6945,7 +6945,7 @@ msgid ""
 "  --no-seh                   Image does not use SEH; no SE handler may\n"
 "                                       be called in this image\n"
 msgstr ""
-"  --no-seh                   Образа не използва SEH. В този образ не може\n"
+"  --no-seh                   Образът не използва SEH. В този образ не може\n"
 "                               да се извиква SE подръжка\n"
 
 #: ei386pep.c:908
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 1bbc064857..3912ef1cdd 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -86,6 +86,7 @@ run_ld_link_tests $aarch64elftests
 run_ld_link_tests eh-frame-merge-lp64
 
 run_dump_test "erratum843419"
+run_dump_test "erratum843419_tls_ie"
 
 # Relocation Tests
 run_dump_test_lp64 "weak-undefined"
diff --git a/ld/testsuite/ld-aarch64/erratum843419_tls_ie.d b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.d
new file mode 100644
index 0000000000..eba5a20217
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.d
@@ -0,0 +1,49 @@
+#source: erratum843419_tls_ie.s
+#as:
+#ld: --fix-cortex-a53-843419 -e0 --section-start .e843419=0x20000000 -Ttext=0x400000 -Tdata=0x40000000
+#objdump: -dr
+#...
+
+Disassembly of section .e843419:
+
+0*20000000 <farbranch>:
+[ ]*20000000:	d10043ff 	sub	sp, sp, #0x10
+[ ]*20000004:	d28001a7 	mov	x7, #0xd                   	// #13
+[ ]*20000008:	b9000fe7 	str	w7, \[sp, #12\]
+[ ]*2000000c:	140003fb 	b	20000ff8 <e843419>
+	...
+
+0*20000ff8 <e843419>:
+[ ]*20000ff8:	d2a00000 	movz	x0, #0x0, lsl #16
+[ ]*20000ffc:	f800c007 	stur	x7, \[x0, #12\]
+[ ]*20001000:	d2800128 	mov	x8, #0x9                   	// #9
+[ ]*20001004:	f2800208 	movk	x8, #0x10
+[ ]*20001008:	8b050020 	add	x0, x1, x5
+[ ]*2000100c:	b9400fe7 	ldr	w7, \[sp, #12\]
+[ ]*20001010:	0b0700e0 	add	w0, w7, w7
+[ ]*20001014:	910043ff 	add	sp, sp, #0x10
+[ ]*20001018:	d65f03c0 	ret
+[ ]*2000101c:	00000000 	.inst	0x00000000 ; undefined
+[ ]*20001020:	14000400 	b	20002020 <e843419\+0x1028>
+[ ]*20001024:	d503201f 	nop
+[ ]*20001028:	00000000 	.inst	0x00000000 ; undefined
+[ ]*2000102c:	17fffff7 	b	20001008 <e843419\+0x10>
+	...
+
+Disassembly of section .text:
+
+0*400000 <main>:
+[ ]*400000:	d10043ff 	sub	sp, sp, #0x10
+[ ]*400004:	d28001a7 	mov	x7, #0xd                   	// #13
+[ ]*400008:	b9000fe7 	str	w7, \[sp, #12\]
+[ ]*40000c:	14000005 	b	400020 <__farbranch_veneer>
+[ ]*400010:	d65f03c0 	ret
+[ ]*400014:	d503201f 	nop
+[ ]*400018:	14000400 	b	401018 <__farbranch_veneer\+0xff8>
+[ ]*40001c:	d503201f 	nop
+
+0*400020 <__farbranch_veneer>:
+[ ]*400020:	900fe010 	adrp	x16, 20000000 <farbranch>
+[ ]*400024:	91000210 	add	x16, x16, #0x0
+[ ]*400028:	d61f0200 	br	x16
+	...
diff --git a/ld/testsuite/ld-aarch64/erratum843419_tls_ie.s b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.s
new file mode 100644
index 0000000000..60322445c5
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/erratum843419_tls_ie.s
@@ -0,0 +1,43 @@
+	.text
+	.align  2
+	.global main
+	.type   main, %function
+main:
+	sub     sp, sp, #16
+	mov     x7, 13
+	str     w7, [sp,12]
+	b       farbranch
+	ret
+	.size   main, .-main
+
+	.section .e843419, "xa"
+	.align  2
+	.global farbranch
+	.type   farbranch, %function
+farbranch:
+	sub     sp, sp, #16
+	mov     x7, 13
+	str     w7, [sp,12]
+	b       e843419
+	 .fill 4072,1,0
+e843419:
+	adrp x0, :gottprel:l_tlsievar
+	str x7, [x0,12]
+	mov	x8, 9
+	str x8, [x0, :gottprel_lo12:l_tlsievar]
+
+	add x0, x1, x5
+	ldr     w7, [sp,12]
+	add     w0, w7, w7
+	add     sp, sp, 16
+	ret
+	.size   farbranch, .-farbranch
+
+# ---
+
+	.section	.tbss,"awT",%nobits
+	.align  2
+	.type   l_tlsievar, %object
+	.size   l_tlsievar, 4
+l_tlsievar:
+	.zero   4
diff --git a/ld/testsuite/ld-aarch64/ifunc-1-local.d b/ld/testsuite/ld-aarch64/ifunc-1-local.d
index bcba0aa025..1783637865 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1-local.d
@@ -3,7 +3,7 @@
 #target: aarch64*-*-*
 
 #...
-0+(110|180) <__GI_foo>:
+0+(110|180|1a0) <(__GI_)?foo>:
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt>
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-1.d b/ld/testsuite/ld-aarch64/ifunc-1.d
index f408bfff78..0274ac0094 100644
--- a/ld/testsuite/ld-aarch64/ifunc-1.d
+++ b/ld/testsuite/ld-aarch64/ifunc-1.d
@@ -3,7 +3,7 @@
 #target: aarch64*-*-*
 
 #...
-0+(130|1a0) <foo>:
+0+(130|1a0|1c8) <foo>:
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt>
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-2-local.d b/ld/testsuite/ld-aarch64/ifunc-2-local.d
index fb1bb40e38..a3d9e15f8b 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2-local.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2-local.d
@@ -3,9 +3,9 @@
 #target: aarch64*-*-*
 
 #...
-0+(110|180) <__GI_foo>:
+0+(110|180|1a0) <__GI_foo>:
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt>
 [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170)
+[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190)
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-2.d b/ld/testsuite/ld-aarch64/ifunc-2.d
index 16c75ead40..eb6fa0ccf0 100644
--- a/ld/testsuite/ld-aarch64/ifunc-2.d
+++ b/ld/testsuite/ld-aarch64/ifunc-2.d
@@ -3,9 +3,9 @@
 #target: aarch64*-*-*
 
 #...
-0+(130|1a0) <foo>:
+0+(130|1a0|1c8) <foo>:
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt>
 [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*>
-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190)
+[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8)
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
index b501bd6712..a16186b587 100644
--- a/ld/testsuite/ld-aarch64/ifunc-21.d
+++ b/ld/testsuite/ld-aarch64/ifunc-21.d
@@ -11,7 +11,7 @@ Contents of section .text:
  [0-9a-f]+ .*
 Contents of section .got.plt:
  [0-9a-f]+ 0+ 0+ 0+ 0+  .*
- 10298 0+ 0+ [0-9a-f]+ [0-9a-f]+  .*
+ (10298|102b8) 0+ 0+ [0-9a-f]+ [0-9a-f]+  .*
 
 Disassembly of section .text:
 
@@ -20,7 +20,7 @@ Disassembly of section .text:
 
 .* <bar>:
  .*:	90000080 	adrp	x0, 10000 <.*>
- .*:	.* 	ldr	x0, \[x0, #672\]
+ .*:	.* 	ldr	x0, \[x0, #(672|704)\]
  .*:	d65f03c0 	ret
 
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-3a.d b/ld/testsuite/ld-aarch64/ifunc-3a.d
index a01a75c904..4919d96892 100644
--- a/ld/testsuite/ld-aarch64/ifunc-3a.d
+++ b/ld/testsuite/ld-aarch64/ifunc-3a.d
@@ -4,7 +4,7 @@
 #target: aarch64*-*-*
 
 #...
-0+(150|1d0) <__GI_foo>:
+0+(150|1d0|1e8) <__GI_foo>:
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt>
 #pass
diff --git a/ld/testsuite/ld-aarch64/ifunc-9.d b/ld/testsuite/ld-aarch64/ifunc-9.d
index 3b4e995254..e921591275 100644
--- a/ld/testsuite/ld-aarch64/ifunc-9.d
+++ b/ld/testsuite/ld-aarch64/ifunc-9.d
@@ -1,3 +1,4 @@
 #ld: --export-dynamic
-#error: .*dynamic STT_GNU_IFUNC symbol `foo' with pointer equality in `.*.o' can not be used when making an executable; recompile with -fPIE and relink with -pie
+#objdump: -dr
 #target: aarch64*-*-*
+#...
diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s
new file mode 100644
index 0000000000..403f98000d
--- /dev/null
+++ b/ld/testsuite/ld-elf/dummy.s
@@ -0,0 +1 @@
+# Dummy
diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S
new file mode 100644
index 0000000000..d94abc1106
--- /dev/null
+++ b/ld/testsuite/ld-elf/linux-x86.S
@@ -0,0 +1,91 @@
+	.text
+	.globl _start
+	.type _start,@function
+	.p2align 4
+_start:
+	xorl %ebp, %ebp
+#ifdef __LP64__
+	popq %rdi
+	movq %rsp, %rsi
+	andq  $~15, %rsp
+#elif defined __x86_64__
+	mov (%rsp),%edi
+	addl $4,%esp
+	movl %esp, %esi
+	andl  $~15, %esp
+#else
+	popl %esi
+	movl %esp, %ecx
+	andl  $~15, %esp
+
+	subl $8,%esp
+	pushl %ecx
+	pushl %esi
+#endif
+
+	call main
+
+	hlt
+
+	.type syscall,  @function
+	.globl syscall
+	.p2align 4
+syscall:
+#ifdef __x86_64__
+	movq %rdi, %rax		/* Syscall number -> rax.  */
+	movq %rsi, %rdi		/* shift arg1 - arg5.  */
+	movq %rdx, %rsi
+	movq %rcx, %rdx
+	movq %r8, %r10
+	movq %r9, %r8
+	movq 8(%rsp),%r9	/* arg6 is on the stack.  */
+	syscall			/* Do the system call.  */
+#else
+	push %ebp
+	push %edi
+	push %esi
+	push %ebx
+	mov 0x2c(%esp),%ebp
+	mov 0x28(%esp),%edi
+	mov 0x24(%esp),%esi
+	mov 0x20(%esp),%edx
+	mov 0x1c(%esp),%ecx
+	mov 0x18(%esp),%ebx
+	mov 0x14(%esp),%eax
+	int $0x80
+	pop %ebx
+	pop %esi
+	pop %edi
+	pop %ebp
+#endif
+	ret			/* Return to caller.  */
+	.size syscall, .-syscall
+	.section .note.GNU-stack,"",@progbits
+
+	.section ".note.gnu.property", "a"
+#ifdef __LP64__
+	.p2align 3
+#else
+	.p2align 2
+#endif
+	.long 1f - 0f		/* name length */
+	.long 5f - 2f		/* data length */
+	.long 5			/* note type */
+0:	.asciz "GNU"		/* vendor name */
+1:
+#ifdef __LP64__
+	.p2align 3
+#else
+	.p2align 2
+#endif
+2:	.long 0xc0000002	/* pr_type.  */
+	.long 4f - 3f		/* pr_datasz.  */
+3:
+	.long 0x2
+4:
+#ifdef __LP64__
+	.p2align 3
+#else
+	.p2align 2
+#endif
+5:
diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp
new file mode 100644
index 0000000000..f6f5a80853
--- /dev/null
+++ b/ld/testsuite/ld-elf/linux-x86.exp
@@ -0,0 +1,46 @@
+# Expect script for simple native Linux/x86 tests.
+#   Copyright (C) 2018 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+
+# Test very simple native Linux/x86 programs with linux-x86.S.
+if { ![isnative] || [which $CC] == 0 \
+     || (![istarget "i?86-*-linux*"] \
+         && ![istarget "x86_64-*-linux*"] \
+         && ![istarget "amd64-*-linux*"]) } {
+    return
+}
+
+# Add $PLT_CFLAGS if PLT is expected.
+global PLT_CFLAGS
+# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
+global NOPIE_CFLAGS NOPIE_LDFLAGS
+
+run_ld_link_exec_tests [list \
+    [list \
+	"Run PR ld/23428 test" \
+	"--no-dynamic-linker -z separate-code" \
+	"" \
+	{ linux-x86.S pr23428.c dummy.s } \
+	"pr23428" \
+	"pass.out" \
+	"$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \
+	"asm" \
+    ] \
+]
diff --git a/ld/testsuite/ld-elf/pr23428.c b/ld/testsuite/ld-elf/pr23428.c
new file mode 100644
index 0000000000..3631ed7926
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr23428.c
@@ -0,0 +1,43 @@
+#include <unistd.h>
+#include <link.h>
+#include <syscall.h>
+
+#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1)
+
+int
+main (int argc, char **argv)
+{
+  char **ev = &argv[argc + 1];
+  char **evp = ev;
+  ElfW(auxv_t) *av;
+  const ElfW(Phdr) *phdr = NULL;
+  size_t phnum = 0;
+  size_t loadnum = 0;
+  int fd = STDOUT_FILENO;
+  size_t i;
+
+  while (*evp++ != NULL)
+    ;
+
+  av = (ElfW(auxv_t) *) evp;
+
+  for (; av->a_type != AT_NULL; ++av)
+    switch (av->a_type)
+      {
+      case AT_PHDR:
+	phdr = (const void *) av->a_un.a_val;
+	break;
+      case AT_PHNUM:
+	phnum = av->a_un.a_val;
+	break;
+      }
+
+  for (i = 0; i < phnum; i++, phdr++)
+    if (phdr->p_type == PT_LOAD)
+      loadnum++;
+
+  syscall (SYS_write, fd, STRING_COMMA_LEN ("PASS\n"));
+
+  syscall (SYS_exit, !loadnum);
+  return 0;
+}
diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp
index b58139e9dd..3909c0eaa1 100644
--- a/ld/testsuite/ld-elf/sec64k.exp
+++ b/ld/testsuite/ld-elf/sec64k.exp
@@ -177,6 +177,8 @@ if { ![istarget "d10v-*-*"]
     foreach sfile $sfiles { puts $ofd "#source: $sfile" }
     if { [istarget spu*-*-*] } {
 	puts $ofd "#ld: --local-store 0:0"
+    } elseif { [istarget "i?86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
+	puts $ofd "#ld: -z noseparate-code"
     } else {
 	puts $ofd "#ld:"
     }
diff --git a/ld/testsuite/ld-i386/abs-iamcu.d b/ld/testsuite/ld-i386/abs-iamcu.d
index ac9beff2e5..aba7d6b03f 100644
--- a/ld/testsuite/ld-i386/abs-iamcu.d
+++ b/ld/testsuite/ld-i386/abs-iamcu.d
@@ -2,7 +2,7 @@
 #source: abs.s
 #source: zero.s
 #as: --32 -march=iamcu
-#ld: -m elf_iamcu
+#ld: -m elf_iamcu -z noseparate-code
 #objdump: -rs -j .text
 
 .*:     file format .*
diff --git a/ld/testsuite/ld-i386/abs.d b/ld/testsuite/ld-i386/abs.d
index e660aca524..191ee4456a 100644
--- a/ld/testsuite/ld-i386/abs.d
+++ b/ld/testsuite/ld-i386/abs.d
@@ -2,7 +2,7 @@
 #as: --32
 #source: abs.s
 #source: zero.s
-#ld: -melf_i386
+#ld: -melf_i386 -z noseparate-code
 #objdump: -rs
 
 .*:     file format .*
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 6d794fe653..56c95367e1 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -462,6 +462,9 @@ run_dump_test "pr23189"
 run_dump_test "pr23194"
 run_dump_test "pr23372a"
 run_dump_test "pr23372b"
+run_dump_test "pr23486a"
+run_dump_test "pr23486b"
+run_dump_test "pr23854"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d
index ec51540a42..7eba52d95e 100644
--- a/ld/testsuite/ld-i386/pr12718.d
+++ b/ld/testsuite/ld-i386/pr12718.d
@@ -1,6 +1,6 @@
 #name: PR ld/12718
 #as: --32
-#ld: -melf_i386
+#ld: -melf_i386 -z noseparate-code
 #readelf: -S
 
 There are 5 section headers, starting at offset 0x[0-9a-f]+:
diff --git a/ld/testsuite/ld-i386/pr12921.d b/ld/testsuite/ld-i386/pr12921.d
index e49079b3c8..ea2da3eb51 100644
--- a/ld/testsuite/ld-i386/pr12921.d
+++ b/ld/testsuite/ld-i386/pr12921.d
@@ -1,6 +1,6 @@
 #name: PR ld/12921
 #as: --32
-#ld: -melf_i386
+#ld: -melf_i386 -z noseparate-code
 #readelf: -S --wide
 
 There are 7 section headers, starting at offset 0x[0-9a-f]+:
diff --git a/ld/testsuite/ld-i386/pr23486a.d b/ld/testsuite/ld-i386/pr23486a.d
new file mode 100644
index 0000000000..41a6dcf7d5
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr23486a.d
@@ -0,0 +1,10 @@
+#source: ../ld-x86-64/pr23486a.s
+#source: ../ld-x86-64/pr23486b.s
+#as: --32
+#ld: -r -m elf_i386
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size	Description
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586
diff --git a/ld/testsuite/ld-i386/pr23486b.d b/ld/testsuite/ld-i386/pr23486b.d
new file mode 100644
index 0000000000..08019b7274
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr23486b.d
@@ -0,0 +1,10 @@
+#source: ../ld-x86-64/pr23486b.s
+#source: ../ld-x86-64/pr23486a.s
+#as: --32
+#ld: -r -m elf_i386
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size	Description
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586
diff --git a/ld/testsuite/ld-i386/pr23854.d b/ld/testsuite/ld-i386/pr23854.d
new file mode 100644
index 0000000000..3ed9c206e5
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr23854.d
@@ -0,0 +1,28 @@
+#as: --32 -mrelax-relocations=yes
+#ld: -melf_i386
+#objdump: -dw
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+[a-f0-9]+ <_start>:
+ +[a-f0-9]+:	66 13 81 f8 ff ff ff 	adc    -0x8\(%ecx\),%ax
+ +[a-f0-9]+:	66 03 99 f8 ff ff ff 	add    -0x8\(%ecx\),%bx
+ +[a-f0-9]+:	66 23 89 f8 ff ff ff 	and    -0x8\(%ecx\),%cx
+ +[a-f0-9]+:	66 3b 91 f8 ff ff ff 	cmp    -0x8\(%ecx\),%dx
+ +[a-f0-9]+:	66 0b b9 f8 ff ff ff 	or     -0x8\(%ecx\),%di
+ +[a-f0-9]+:	66 1b b1 f8 ff ff ff 	sbb    -0x8\(%ecx\),%si
+ +[a-f0-9]+:	66 2b a9 f8 ff ff ff 	sub    -0x8\(%ecx\),%bp
+ +[a-f0-9]+:	66 33 a1 f8 ff ff ff 	xor    -0x8\(%ecx\),%sp
+ +[a-f0-9]+:	66 85 89 f8 ff ff ff 	test   %cx,-0x8\(%ecx\)
+ +[a-f0-9]+:	66 13 81 fc ff ff ff 	adc    -0x4\(%ecx\),%ax
+ +[a-f0-9]+:	66 03 99 fc ff ff ff 	add    -0x4\(%ecx\),%bx
+ +[a-f0-9]+:	66 23 89 fc ff ff ff 	and    -0x4\(%ecx\),%cx
+ +[a-f0-9]+:	66 3b 91 fc ff ff ff 	cmp    -0x4\(%ecx\),%dx
+ +[a-f0-9]+:	66 0b b9 fc ff ff ff 	or     -0x4\(%ecx\),%di
+ +[a-f0-9]+:	66 1b b1 fc ff ff ff 	sbb    -0x4\(%ecx\),%si
+ +[a-f0-9]+:	66 2b a9 fc ff ff ff 	sub    -0x4\(%ecx\),%bp
+ +[a-f0-9]+:	66 33 a1 fc ff ff ff 	xor    -0x4\(%ecx\),%sp
+ +[a-f0-9]+:	66 85 89 fc ff ff ff 	test   %cx,-0x4\(%ecx\)
+#pass
diff --git a/ld/testsuite/ld-i386/pr23854.s b/ld/testsuite/ld-i386/pr23854.s
new file mode 100644
index 0000000000..565e747be0
--- /dev/null
+++ b/ld/testsuite/ld-i386/pr23854.s
@@ -0,0 +1,33 @@
+	.data
+	.type	bar, @object
+bar:
+	.byte	1
+	.size	bar, .-bar
+	.globl	foo
+	.type	foo, @object
+foo:
+	.byte	1
+	.size	foo, .-foo
+	.text
+	.globl	_start
+	.type	_start, @function
+_start:
+	adcw	bar@GOT(%ecx), %ax
+	addw	bar@GOT(%ecx), %bx
+	andw	bar@GOT(%ecx), %cx
+	cmpw	bar@GOT(%ecx), %dx
+	orw	bar@GOT(%ecx), %di
+	sbbw	bar@GOT(%ecx), %si
+	subw	bar@GOT(%ecx), %bp
+	xorw	bar@GOT(%ecx), %sp
+	testw	%cx, bar@GOT(%ecx)
+	adcw	foo@GOT(%ecx), %ax
+	addw	foo@GOT(%ecx), %bx
+	andw	foo@GOT(%ecx), %cx
+	cmpw	foo@GOT(%ecx), %dx
+	orw	foo@GOT(%ecx), %di
+	sbbw	foo@GOT(%ecx), %si
+	subw	foo@GOT(%ecx), %bp
+	xorw	foo@GOT(%ecx), %sp
+	testw	%cx, foo@GOT(%ecx)
+	.size	_start, .-_start
diff --git a/ld/testsuite/ld-i386/property-3.r b/ld/testsuite/ld-i386/property-3.r
index 0ed91f5922..d03203c1e5 100644
--- a/ld/testsuite/ld-i386/property-3.r
+++ b/ld/testsuite/ld-i386/property-3.r
@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-	x86 ISA used: 586, SSE
 	x86 ISA needed: i486, 586
 #pass
diff --git a/ld/testsuite/ld-i386/property-4.r b/ld/testsuite/ld-i386/property-4.r
index cb2bc15d9a..da295eb6c7 100644
--- a/ld/testsuite/ld-i386/property-4.r
+++ b/ld/testsuite/ld-i386/property-4.r
@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-	x86 ISA used: i486, 586, SSE
 	x86 ISA needed: i486, 586, SSE
 #pass
diff --git a/ld/testsuite/ld-i386/property-5.r b/ld/testsuite/ld-i386/property-5.r
index 552965058c..e4141594b3 100644
--- a/ld/testsuite/ld-i386/property-5.r
+++ b/ld/testsuite/ld-i386/property-5.r
@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
-	x86 ISA used: i486, 586, SSE
 	x86 ISA needed: i486, 586, SSE
 #pass
diff --git a/ld/testsuite/ld-i386/property-x86-ibt3a.d b/ld/testsuite/ld-i386/property-x86-ibt3a.d
index 4bb35b00fb..0aedea1614 100644
--- a/ld/testsuite/ld-i386/property-x86-ibt3a.d
+++ b/ld/testsuite/ld-i386/property-x86-ibt3a.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: i486, 586, SSE2, SSE3
-	x86 ISA needed: 586, SSE, SSE3, SSE4_1
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
diff --git a/ld/testsuite/ld-i386/property-x86-ibt3b.d b/ld/testsuite/ld-i386/property-x86-ibt3b.d
index 418d58a8f7..bd69ac6478 100644
--- a/ld/testsuite/ld-i386/property-x86-ibt3b.d
+++ b/ld/testsuite/ld-i386/property-x86-ibt3b.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: i486, 586, SSE2, SSE3
-	x86 ISA needed: 586, SSE, SSE3, SSE4_1
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
diff --git a/ld/testsuite/ld-i386/property-x86-shstk3a.d b/ld/testsuite/ld-i386/property-x86-shstk3a.d
index e261038f60..76d2a39f2c 100644
--- a/ld/testsuite/ld-i386/property-x86-shstk3a.d
+++ b/ld/testsuite/ld-i386/property-x86-shstk3a.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: i486, 586, SSE2, SSE3
-	x86 ISA needed: 586, SSE, SSE3, SSE4_1
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
diff --git a/ld/testsuite/ld-i386/property-x86-shstk3b.d b/ld/testsuite/ld-i386/property-x86-shstk3b.d
index 25f3d2361e..e770ecffa5 100644
--- a/ld/testsuite/ld-i386/property-x86-shstk3b.d
+++ b/ld/testsuite/ld-i386/property-x86-shstk3b.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: i486, 586, SSE2, SSE3
-	x86 ISA needed: 586, SSE, SSE3, SSE4_1
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp
index 612d91402f..2b97af79e5 100644
--- a/ld/testsuite/ld-ifunc/ifunc.exp
+++ b/ld/testsuite/ld-ifunc/ifunc.exp
@@ -713,7 +713,9 @@ run_ld_link_exec_tests [list \
 # That does not happen for the pr23169 testcase where the resolver is
 # in the executable (which is relocated last by ld.so).
 if { [isnative]
-     && ![istarget "powerpc-*-*"] } {
+     && !([istarget "powerpc-*-*"]
+           || [istarget "aarch64*-*-*"]
+           || [istarget "sparc*-*-*"]) } {
 run_ld_link_exec_tests [list \
     [list \
 	"Run pr23169a" \
diff --git a/ld/testsuite/ld-linkonce/zeroeh.ld b/ld/testsuite/ld-linkonce/zeroeh.ld
index b22eaa12c9..f89855a08f 100644
--- a/ld/testsuite/ld-linkonce/zeroeh.ld
+++ b/ld/testsuite/ld-linkonce/zeroeh.ld
@@ -2,4 +2,5 @@ SECTIONS {
  .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) }
  .gcc_except_table 0x2000 : { *(.gcc_except_table) }
  .eh_frame 0x4000 : { *(.eh_frame) }
+  /DISCARD/ : { *(.note.gnu.property) }
 }
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 7c50b0f102..4ce74f2587 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -219,6 +219,12 @@ set lto_link_tests [list \
   [list "Build pr22751.a" \
    "$plug_opt" "-flto $lto_no_fat $INT128_CFLAGS" \
    {pr22751.c} {} "pr22751.a"] \
+  [list "Build libpr23818.so" \
+   "-shared -flto -g -Wl,-version-script,pr23818.t" \
+   "-g -flto $lto_fat" \
+   {pr23818a.c pr23818b.c} \
+   {{"readelf" {-s --wide} "pr23818.d"}} \
+   "libpr23818.so"] \
 ]
 
 if { [at_least_gcc_version 4 7] } {
diff --git a/ld/testsuite/ld-plugin/pr23818.d b/ld/testsuite/ld-plugin/pr23818.d
new file mode 100644
index 0000000000..5753cd64fd
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr23818.d
@@ -0,0 +1,4 @@
+#failif
+#...
+.*0+ +[A-Z]+ +GLOBAL +DEFAULT +ABS foo
+#...
diff --git a/ld/testsuite/ld-plugin/pr23818.t b/ld/testsuite/ld-plugin/pr23818.t
new file mode 100644
index 0000000000..45bca5580e
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr23818.t
@@ -0,0 +1,4 @@
+{
+  global: bar;
+  local: *;
+};
diff --git a/ld/testsuite/ld-plugin/pr23818a.c b/ld/testsuite/ld-plugin/pr23818a.c
new file mode 100644
index 0000000000..5b5ccbf7cb
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr23818a.c
@@ -0,0 +1,4 @@
+void
+foo ()
+{
+}
diff --git a/ld/testsuite/ld-plugin/pr23818b.c b/ld/testsuite/ld-plugin/pr23818b.c
new file mode 100644
index 0000000000..d4be333a39
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr23818b.c
@@ -0,0 +1,7 @@
+void foo (void);
+
+void
+bar (void)
+{
+  foo ();
+}
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp
index 0359ba28cb..5ec3850787 100644
--- a/ld/testsuite/ld-powerpc/powerpc.exp
+++ b/ld/testsuite/ld-powerpc/powerpc.exp
@@ -221,7 +221,7 @@ set ppc64elftests {
      "tlsopt4"}
     {"TLS DLL" "-shared -melf64ppc --version-script tlsdll.ver" "" "-a64" {tlsdll.s}
      {} "tlsdll.so"}
-    {"TLS opt 5" "-melf64ppc --no-plt-align -shared --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64"  {tlsopt5.s}
+    {"TLS opt 5" "-melf64ppc -shared --hash-style=both --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64"  {tlsopt5.s}
      {{objdump -dr tlsopt5.d} {readelf -wf tlsopt5.wf}}
      "tlsopt5"}
     {"sym@tocbase" "-shared -melf64ppc" "" "-a64" {symtocbase-1.s symtocbase-2.s}
@@ -328,6 +328,7 @@ if [ supports_ppc64 ] then {
     run_dump_test "dotsym2"
     run_dump_test "dotsym3"
     run_dump_test "dotsym4"
+    run_dump_test "pr23937"
 }
 
 run_dump_test "tlsld32"
diff --git a/ld/testsuite/ld-powerpc/pr23937.d b/ld/testsuite/ld-powerpc/pr23937.d
new file mode 100644
index 0000000000..6ef79e81cf
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/pr23937.d
@@ -0,0 +1,10 @@
+#as: -a64
+#ld: -melf64ppc --defsym puts=0 --defsym _start=0
+#readelf: -srW
+# Check that the IRELATIVE addend is magic+0, not magic+8
+
+#...
+.* R_PPC64_IRELATIVE +10000180
+#...
+.*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic
+#pass
diff --git a/ld/testsuite/ld-powerpc/pr23937.s b/ld/testsuite/ld-powerpc/pr23937.s
new file mode 100644
index 0000000000..155e53adb7
--- /dev/null
+++ b/ld/testsuite/ld-powerpc/pr23937.s
@@ -0,0 +1,65 @@
+	.abiversion 2
+	.text
+	.p2align 4,,15
+	.type	implementation, @function
+implementation:
+.LCF0:
+	addis 2,12,.TOC.-.LCF0@ha
+	addi 2,2,.TOC.-.LCF0@l
+	.localentry	implementation,.-implementation
+	mflr 0
+	addis 3,2,.LC0@toc@ha
+	addi 3,3,.LC0@toc@l
+	std 0,16(1)
+	stdu 1,-32(1)
+	bl puts
+	nop
+	addi 1,1,32
+	li 3,0
+	ld 0,16(1)
+	mtlr 0
+	blr
+	.size	implementation,.-implementation
+
+	.p2align 4,,15
+	.type	resolver, @function
+resolver:
+.LCF1:
+	addis 2,12,.TOC.-.LCF1@ha
+	addi 2,2,.TOC.-.LCF1@l
+	.localentry	resolver,.-resolver
+	addis 3,2,implementation@toc@ha
+	addi 3,3,implementation@toc@l
+	blr
+	.size	resolver,.-resolver
+
+	.type	magic, @gnu_indirect_function
+	.set	magic,resolver
+
+	.section	.text.startup,"ax",@progbits
+	.p2align 4,,15
+	.globl main
+	.type	main, @function
+main:
+.LCF2:
+	addis 2,12,.TOC.-.LCF2@ha
+	addi 2,2,.TOC.-.LCF2@l
+	.localentry	main,.-main
+	mflr 0
+	std 0,16(1)
+	stdu 1,-32(1)
+	bl magic
+	nop
+	addi 1,1,32
+	cntlzw 3,3
+	ld 0,16(1)
+	srwi 3,3,5
+	mtlr 0
+	xori 3,3,0x1
+	blr
+	.size	main,.-main
+
+	.section	.rodata.str1.8,"aMS",@progbits,1
+	.p2align 3
+.LC0:
+	.string	"'ere I am JH"
diff --git a/ld/testsuite/ld-powerpc/tlsopt5.d b/ld/testsuite/ld-powerpc/tlsopt5.d
index 4521a9b427..4caf1832ea 100644
--- a/ld/testsuite/ld-powerpc/tlsopt5.d
+++ b/ld/testsuite/ld-powerpc/tlsopt5.d
@@ -8,6 +8,13 @@
 
 Disassembly of section \.text:
 
+.* <.*\.plt_call\.foo>:
+.*:	(18 00 41 f8|f8 41 00 18) 	std     r2,24\(r1\)
+.*:	(28 80 82 e9|e9 82 80 28) 	ld      r12,-32728\(r2\)
+.*:	(a6 03 89 7d|7d 89 03 a6) 	mtctr   r12
+.*:	(20 04 80 4e|4e 80 04 20) 	bctr
+	\.\.\.
+
 .* <.*\.plt_call\.__tls_get_addr_opt@@GLIBC_2\.22>:
 .*:	(00 00 63 e9|e9 63 00 00) 	ld      r11,0\(r3\)
 .*:	(08 00 83 e9|e9 83 00 08) 	ld      r12,8\(r3\)
@@ -19,17 +26,21 @@ Disassembly of section \.text:
 .*:	(a6 02 68 7d|7d 68 02 a6) 	mflr    r11
 .*:	(08 00 61 f9|f9 61 00 08) 	std     r11,8\(r1\)
 .*:	(18 00 41 f8|f8 41 00 18) 	std     r2,24\(r1\)
-.*:	(28 80 82 e9|e9 82 80 28) 	ld      r12,-32728\(r2\)
+.*:	(30 80 82 e9|e9 82 80 30) 	ld      r12,-32720\(r2\)
 .*:	(a6 03 89 7d|7d 89 03 a6) 	mtctr   r12
 .*:	(21 04 80 4e|4e 80 04 21) 	bctrl
 .*:	(18 00 41 e8|e8 41 00 18) 	ld      r2,24\(r1\)
 .*:	(08 00 61 e9|e9 61 00 08) 	ld      r11,8\(r1\)
 .*:	(a6 03 68 7d|7d 68 03 a6) 	mtlr    r11
 .*:	(20 00 80 4e|4e 80 00 20) 	blr
+	\.\.\.
 
 .* <_start>:
 .*:	(08 80 62 38|38 62 80 08) 	addi    r3,r2,-32760
-.*:	(b9 ff ff 4b|4b ff ff b9) 	bl      .*
+.*:	(9d ff ff 4b|4b ff ff 9d) 	bl      .* <.*\.plt_call\.__tls_get_addr_opt@@GLIBC_2\.22>
+.*:	(00 00 00 60|60 00 00 00) 	nop
+.*:	(75 ff ff 4b|4b ff ff 75) 	bl      .* <.*\.plt_call\.foo>
+.*:	(18 00 41 e8|e8 41 00 18) 	ld      r2,24\(r1\)
 .*:	(00 00 00 60|60 00 00 00) 	nop
 .*
 .*
@@ -50,5 +61,8 @@ Disassembly of section \.text:
 .*:	(08 00 6b e9|e9 6b 00 08) 	ld      r11,8\(r11\)
 .*:	(20 04 80 4e|4e 80 04 20) 	bctr
 
+.* <foo@plt>:
+.*	(c8 ff ff 4b|4b ff ff c8) 	b       .*
+
 .* <__tls_get_addr_opt@plt>:
-.*:	(c8 ff ff 4b|4b ff ff c8) 	b       .*
+.*:	(c4 ff ff 4b|4b ff ff c4) 	b       .*
diff --git a/ld/testsuite/ld-powerpc/tlsopt5.s b/ld/testsuite/ld-powerpc/tlsopt5.s
index 70902ef96a..7cb82db1f6 100644
--- a/ld/testsuite/ld-powerpc/tlsopt5.s
+++ b/ld/testsuite/ld-powerpc/tlsopt5.s
@@ -1,7 +1,10 @@
  .globl _start
+ .weak foo
 _start:
  .cfi_startproc
  addi 3,2,gd@got@tlsgd
  bl __tls_get_addr(gd@tlsgd)
  nop
+ bl foo
+ nop
  .cfi_endproc
diff --git a/ld/testsuite/ld-powerpc/tlsopt5.wf b/ld/testsuite/ld-powerpc/tlsopt5.wf
index af8cb76d1c..f0453610e0 100644
--- a/ld/testsuite/ld-powerpc/tlsopt5.wf
+++ b/ld/testsuite/ld-powerpc/tlsopt5.wf
@@ -7,11 +7,10 @@ Contents of the \.eh_frame section:
   Data alignment factor: -8
   Return address column: 65
   Augmentation data:     1b
-
   DW_CFA_def_cfa: r1 ofs 0
 
 0+14 0+14 0+18 FDE cie=0+ pc=.*
-  DW_CFA_advance_loc: 48 to .*
+  DW_CFA_advance_loc: 80 to .*
   DW_CFA_offset_extended_sf: r65 at cfa\+8
   DW_CFA_advance_loc: 16 to .*
   DW_CFA_restore_extended: r65
diff --git a/ld/testsuite/ld-scripts/print-memory-usage.t b/ld/testsuite/ld-scripts/print-memory-usage.t
index 5ff057a5e3..6eda1d2dc4 100644
--- a/ld/testsuite/ld-scripts/print-memory-usage.t
+++ b/ld/testsuite/ld-scripts/print-memory-usage.t
@@ -11,4 +11,6 @@ SECTIONS
     *(.data)
     *(.rw)
   }
+
+  /DISCARD/ : { *(.note.gnu.property) }
 }
diff --git a/ld/testsuite/ld-scripts/size-2.t b/ld/testsuite/ld-scripts/size-2.t
index 723863995e..c3c4eddab4 100644
--- a/ld/testsuite/ld-scripts/size-2.t
+++ b/ld/testsuite/ld-scripts/size-2.t
@@ -18,4 +18,5 @@ SECTIONS
     LONG (SIZEOF (.tdata))
     LONG (SIZEOF (.tbss))
   } :image
+  /DISCARD/ : { *(.note.gnu.property) }
 }
diff --git a/ld/testsuite/ld-x86-64/abs-k1om.d b/ld/testsuite/ld-x86-64/abs-k1om.d
index 2c26639fc0..6b0fde0eed 100644
--- a/ld/testsuite/ld-x86-64/abs-k1om.d
+++ b/ld/testsuite/ld-x86-64/abs-k1om.d
@@ -2,7 +2,7 @@
 #source: ../ld-i386/abs.s
 #source: ../ld-i386/zero.s
 #as: --64 -march=k1om
-#ld: -m elf_k1om
+#ld: -m elf_k1om -z noseparate-code
 #objdump: -rs -j .text
 
 .*:     file format .*
diff --git a/ld/testsuite/ld-x86-64/abs-l1om.d b/ld/testsuite/ld-x86-64/abs-l1om.d
index 1fb96d44b7..f87869f9d0 100644
--- a/ld/testsuite/ld-x86-64/abs-l1om.d
+++ b/ld/testsuite/ld-x86-64/abs-l1om.d
@@ -2,7 +2,7 @@
 #source: ../ld-i386/abs.s
 #source: ../ld-i386/zero.s
 #as: --64 -march=l1om
-#ld: -m elf_l1om
+#ld: -m elf_l1om -z noseparate-code
 #objdump: -rs -j .text
 #target: x86_64-*-linux*
 
diff --git a/ld/testsuite/ld-x86-64/abs.d b/ld/testsuite/ld-x86-64/abs.d
index b24b018639..d99ab4685d 100644
--- a/ld/testsuite/ld-x86-64/abs.d
+++ b/ld/testsuite/ld-x86-64/abs.d
@@ -1,7 +1,7 @@
 #name: Absolute non-overflowing relocs
 #source: ../ld-i386/abs.s
 #source: ../ld-i386/zero.s
-#ld:
+#ld: -z noseparate-code
 #objdump: -rs
 
 .*:     file format .*
diff --git a/ld/testsuite/ld-x86-64/pr12718.d b/ld/testsuite/ld-x86-64/pr12718.d
index 07d17325d0..2c503ffbaa 100644
--- a/ld/testsuite/ld-x86-64/pr12718.d
+++ b/ld/testsuite/ld-x86-64/pr12718.d
@@ -1,6 +1,6 @@
 #name: PR ld/12718
 #as: --64
-#ld: -melf_x86_64
+#ld: -melf_x86_64 -z noseparate-code
 #readelf: -S --wide
 
 There are 5 section headers, starting at offset 0x[0-9a-f]+:
diff --git a/ld/testsuite/ld-x86-64/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d
index 6fe6abee09..1162d55818 100644
--- a/ld/testsuite/ld-x86-64/pr12921.d
+++ b/ld/testsuite/ld-x86-64/pr12921.d
@@ -1,6 +1,6 @@
 #name: PR ld/12921
 #as: --64
-#ld: -melf_x86_64
+#ld: -melf_x86_64 -z noseparate-code
 #readelf: -S --wide
 
 There are 7 section headers, starting at offset 0x[0-9a-f]+:
diff --git a/ld/testsuite/ld-x86-64/pr23486a-x32.d b/ld/testsuite/ld-x86-64/pr23486a-x32.d
new file mode 100644
index 0000000000..6d9fa68cdb
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23486a-x32.d
@@ -0,0 +1,10 @@
+#source: pr23486a.s
+#source: pr23486b.s
+#as: --x32
+#ld: -r -m elf32_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size	Description
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586
diff --git a/ld/testsuite/ld-x86-64/pr23486a.d b/ld/testsuite/ld-x86-64/pr23486a.d
new file mode 100644
index 0000000000..dc2b7bf760
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23486a.d
@@ -0,0 +1,10 @@
+#source: pr23486a.s
+#source: pr23486b.s
+#as: --64 -defsym __64_bit__=1
+#ld: -r -m elf_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size	Description
+  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586
diff --git a/ld/testsuite/ld-x86-64/pr23486a.s b/ld/testsuite/ld-x86-64/pr23486a.s
new file mode 100644
index 0000000000..a07d0c7ced
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23486a.s
@@ -0,0 +1,30 @@
+	.section ".note.gnu.property", "a"
+.ifdef __64_bit__
+	.p2align 3
+.else
+	.p2align 2
+.endif
+	.long 1f - 0f		/* name length.  */
+	.long 4f - 1f		/* data length.  */
+	/* NT_GNU_PROPERTY_TYPE_0 */
+	.long 5			/* note type.  */
+0:
+	.asciz "GNU"		/* vendor name.  */
+1:
+.ifdef __64_bit__
+	.p2align 3
+.else
+	.p2align 2
+.endif
+	/* GNU_PROPERTY_X86_ISA_1_USED */
+	.long 0xc0000000	/* pr_type.  */
+	.long 3f - 2f		/* pr_datasz.  */
+2:
+	.long 0xa
+3:
+.ifdef __64_bit__
+	.p2align 3
+.else
+	.p2align 2
+.endif
+4:
diff --git a/ld/testsuite/ld-x86-64/pr23486b-x32.d b/ld/testsuite/ld-x86-64/pr23486b-x32.d
new file mode 100644
index 0000000000..0445e69d82
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23486b-x32.d
@@ -0,0 +1,10 @@
+#source: pr23486b.s
+#source: pr23486a.s
+#as: --x32
+#ld: -r -m elf32_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size	Description
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586
diff --git a/ld/testsuite/ld-x86-64/pr23486b.d b/ld/testsuite/ld-x86-64/pr23486b.d
new file mode 100644
index 0000000000..dd0fe88143
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23486b.d
@@ -0,0 +1,10 @@
+#source: pr23486b.s
+#source: pr23486a.s
+#as: --64 -defsym __64_bit__=1
+#ld: -r -m elf_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size	Description
+  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586
diff --git a/ld/testsuite/ld-x86-64/pr23486b.s b/ld/testsuite/ld-x86-64/pr23486b.s
new file mode 100644
index 0000000000..c5167eeb65
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23486b.s
@@ -0,0 +1,30 @@
+	.section ".note.gnu.property", "a"
+.ifdef __64_bit__
+	.p2align 3
+.else
+	.p2align 2
+.endif
+	.long 1f - 0f		/* name length.  */
+	.long 4f - 1f		/* data length.  */
+	/* NT_GNU_PROPERTY_TYPE_0 */
+	.long 5			/* note type.  */
+0:
+	.asciz "GNU"		/* vendor name.  */
+1:
+.ifdef __64_bit__
+	.p2align 3
+.else
+	.p2align 2
+.endif
+	/* GNU_PROPERTY_X86_ISA_1_NEEDED */
+	.long 0xc0000001	/* pr_type.  */
+	.long 3f - 2f		/* pr_datasz.  */
+2:
+	.long 0x3
+3:
+.ifdef __64_bit__
+	.p2align 3
+.else
+	.p2align 2
+.endif
+4:
diff --git a/ld/testsuite/ld-x86-64/pr23854.d b/ld/testsuite/ld-x86-64/pr23854.d
new file mode 100644
index 0000000000..95770d3cef
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23854.d
@@ -0,0 +1,28 @@
+#as: --64 -mrelax-relocations=yes
+#ld: -melf_x86_64
+#objdump: -dw
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+[a-f0-9]+ <_start>:
+ +[a-f0-9]+:	66 13 05 ([0-9a-f]{2} ){4} *	adc    0x[a-f0-9]+\(%rip\),%ax        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 03 1d ([0-9a-f]{2} ){4} *	add    0x[a-f0-9]+\(%rip\),%bx        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 23 0d ([0-9a-f]{2} ){4} *	and    0x[a-f0-9]+\(%rip\),%cx        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 3b 15 ([0-9a-f]{2} ){4} *	cmp    0x[a-f0-9]+\(%rip\),%dx        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 0b 3d ([0-9a-f]{2} ){4} *	or     0x[a-f0-9]+\(%rip\),%di        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 1b 35 ([0-9a-f]{2} ){4} *	sbb    0x[a-f0-9]+\(%rip\),%si        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 2b 2d ([0-9a-f]{2} ){4} *	sub    0x[a-f0-9]+\(%rip\),%bp        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 44 33 05 ([0-9a-f]{2} ){4} *	xor    0x[a-f0-9]+\(%rip\),%r8w        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 85 0d ([0-9a-f]{2} ){4} *	test   %cx,0x[a-f0-9]+\(%rip\)        # [a-f0-9]+ <.got>
+ +[a-f0-9]+:	66 13 05 ([0-9a-f]{2} ){4} *	adc    0x[a-f0-9]+\(%rip\),%ax        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 03 1d ([0-9a-f]{2} ){4} *	add    0x[a-f0-9]+\(%rip\),%bx        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 23 0d ([0-9a-f]{2} ){4} *	and    0x[a-f0-9]+\(%rip\),%cx        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 3b 15 ([0-9a-f]{2} ){4} *	cmp    0x[a-f0-9]+\(%rip\),%dx        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 0b 3d ([0-9a-f]{2} ){4} *	or     0x[a-f0-9]+\(%rip\),%di        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 1b 35 ([0-9a-f]{2} ){4} *	sbb    0x[a-f0-9]+\(%rip\),%si        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 2b 2d ([0-9a-f]{2} ){4} *	sub    0x[a-f0-9]+\(%rip\),%bp        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 44 33 05 ([0-9a-f]{2} ){4} *	xor    0x[a-f0-9]+\(%rip\),%r8w        # [a-f0-9]+ <.got\+0x8>
+ +[a-f0-9]+:	66 85 0d ([0-9a-f]{2} ){4} *	test   %cx,0x[a-f0-9]+\(%rip\)        # [a-f0-9]+ <.got\+0x8>
+#pass
diff --git a/ld/testsuite/ld-x86-64/pr23854.s b/ld/testsuite/ld-x86-64/pr23854.s
new file mode 100644
index 0000000000..b720154fb2
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23854.s
@@ -0,0 +1,33 @@
+	.data
+	.type	bar, @object
+bar:
+	.byte	1
+	.size	bar, .-bar
+	.globl	foo
+	.type	foo, @object
+foo:
+	.byte	1
+	.size	foo, .-foo
+	.text
+	.globl	_start
+	.type	_start, @function
+_start:
+	adcw	bar@GOTPCREL(%rip), %ax
+	addw	bar@GOTPCREL(%rip), %bx
+	andw	bar@GOTPCREL(%rip), %cx
+	cmpw	bar@GOTPCREL(%rip), %dx
+	orw	bar@GOTPCREL(%rip), %di
+	sbbw	bar@GOTPCREL(%rip), %si
+	subw	bar@GOTPCREL(%rip), %bp
+	xorw	bar@GOTPCREL(%rip), %r8w
+	testw	%cx, bar@GOTPCREL(%rip)
+	adcw	foo@GOTPCREL(%rip), %ax
+	addw	foo@GOTPCREL(%rip), %bx
+	andw	foo@GOTPCREL(%rip), %cx
+	cmpw	foo@GOTPCREL(%rip), %dx
+	orw	foo@GOTPCREL(%rip), %di
+	sbbw	foo@GOTPCREL(%rip), %si
+	subw	foo@GOTPCREL(%rip), %bp
+	xorw	foo@GOTPCREL(%rip), %r8w
+	testw	%cx, foo@GOTPCREL(%rip)
+	.size	_start, .-_start
diff --git a/ld/testsuite/ld-x86-64/pr24151a-x32.d b/ld/testsuite/ld-x86-64/pr24151a-x32.d
new file mode 100644
index 0000000000..130611ddf4
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr24151a-x32.d
@@ -0,0 +1,4 @@
+#source: pr24151a.s
+#as: --x32
+#ld: -shared -melf32_x86_64
+#error: .*relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object
diff --git a/ld/testsuite/ld-x86-64/pr24151a.d b/ld/testsuite/ld-x86-64/pr24151a.d
new file mode 100644
index 0000000000..783b85a1a6
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr24151a.d
@@ -0,0 +1,3 @@
+#as: --64
+#ld: -shared -melf_x86_64
+#error: .*relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object
diff --git a/ld/testsuite/ld-x86-64/pr24151a.s b/ld/testsuite/ld-x86-64/pr24151a.s
new file mode 100644
index 0000000000..e4ec7c8ce4
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr24151a.s
@@ -0,0 +1,9 @@
+	.text
+	.globl	bar
+	.type	bar,@function
+bar:
+	movl	$30, foo(%rip)
+	.size	bar, .-bar
+	.protected foo
+	.type	foo,@object
+	.comm	foo,4,4
diff --git a/ld/testsuite/ld-x86-64/property-3.r b/ld/testsuite/ld-x86-64/property-3.r
index 0ed91f5922..d03203c1e5 100644
--- a/ld/testsuite/ld-x86-64/property-3.r
+++ b/ld/testsuite/ld-x86-64/property-3.r
@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-	x86 ISA used: 586, SSE
 	x86 ISA needed: i486, 586
 #pass
diff --git a/ld/testsuite/ld-x86-64/property-4.r b/ld/testsuite/ld-x86-64/property-4.r
index cb2bc15d9a..da295eb6c7 100644
--- a/ld/testsuite/ld-x86-64/property-4.r
+++ b/ld/testsuite/ld-x86-64/property-4.r
@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-	x86 ISA used: i486, 586, SSE
 	x86 ISA needed: i486, 586, SSE
 #pass
diff --git a/ld/testsuite/ld-x86-64/property-5.r b/ld/testsuite/ld-x86-64/property-5.r
index 552965058c..e4141594b3 100644
--- a/ld/testsuite/ld-x86-64/property-5.r
+++ b/ld/testsuite/ld-x86-64/property-5.r
@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
-	x86 ISA used: i486, 586, SSE
 	x86 ISA needed: i486, 586, SSE
 #pass
diff --git a/ld/testsuite/ld-x86-64/property-x86-3.s b/ld/testsuite/ld-x86-64/property-x86-3.s
index be8cc9efb1..239cf622ff 100644
--- a/ld/testsuite/ld-x86-64/property-x86-3.s
+++ b/ld/testsuite/ld-x86-64/property-x86-3.s
@@ -41,7 +41,11 @@
 3:
 
 	.section ".note.gnu.property", "a"
+.ifdef __64_bit__
 	.p2align 3
+.else
+	.p2align 2
+.endif
 	.long 1f - 0f		/* name length.  */
 	.long 3f - 1f		/* data length.  */
 	/* NT_GNU_PROPERTY_TYPE_0 */
diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
index 011426f5a4..4cec728dc7 100644
--- a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d
index 1b4229a037..a8df49a351 100644
--- a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d
+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000020	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
index 290ed6abf1..c112626711 100644
--- a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d
index 1142e03272..f10dffdc2c 100644
--- a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d
+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000020	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
index 819542d181..0147a3c7b6 100644
--- a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d
index 4c5d0e0a18..1f8c2dc929 100644
--- a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d
+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000020	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
index ba181e0bc5..7ca2539ca5 100644
--- a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000018	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d
index 5216f385dd..f66a40e449 100644
--- a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d
+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d
@@ -6,6 +6,5 @@
 
 Displaying notes found in: .note.gnu.property
   Owner                 Data size	Description
-  GNU                  0x00000020	NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-	x86 ISA needed: i486, 586, SSE2, SSE3
+  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 6edb9e86f4..ac41d8ea49 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -403,6 +403,13 @@ run_dump_test "pr23372a"
 run_dump_test "pr23372a-x32"
 run_dump_test "pr23372b"
 run_dump_test "pr23372b-x32"
+run_dump_test "pr23486a"
+run_dump_test "pr23486a-x32"
+run_dump_test "pr23486b"
+run_dump_test "pr23486b-x32"
+run_dump_test "pr23854"
+run_dump_test "pr24151a"
+run_dump_test "pr24151a-x32"
 
 if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
     return
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index cfbefe9028..1095091882 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1482,7 +1482,10 @@ proc run_ld_link_exec_tests { ldtests args } {
 	    continue
 	}
 
-	if { [ string match "c++" $lang ] } {
+	if { [ string match "asm" $lang ] } {
+	    set link_proc ld_link
+	    set link_cmd $ld
+	} elseif { [ string match "c++" $lang ] } {
 	    set link_proc ld_link
 	    set link_cmd $CXX
 	} else {
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index d04963a9fa..8f89565935 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,36 @@
+2018-10-19  Tamar Christina  <tamar.christina@arm.com>
+
+	* arm-dis.c (UNKNOWN_INSTRUCTION_32BIT): Format specifier for arm mode.
+	(UNKNOWN_INSTRUCTION_16BIT): Format specifier for thumb mode.
+	(print_insn_arm, print_insn_thumb16, print_insn_thumb32): Use them.
+
+2018-10-16  Matthew Malcomson  <matthew.malcomson@arm.com>
+
+	* aarch64-opc.c (struct operand_qualifier_data): Change qualifier data
+	corresponding to AARCH64_OPND_QLF_S_4B qualifier.
+
+2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* i386-dis.c (rm_table): Add enclv.
+	* i386-opc.tbl: Add enclv.
+	* i386-tbl.h: Regenerated.
+
+2018-07-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR gas/23418
+	* i386-opc.h (Byte): Update comments.
+	(Word): Likewise.
+	(Dword): Likewise.
+	(Fword): Likewise.
+	(Qword): Likewise.
+	(Tbyte): Likewise.
+	(Xmmword): Likewise.
+	(Ymmword): Likewise.
+	(Zmmword): Likewise.
+	* i386-opc.tbl: Split vcvtps2qq, vcvtps2uqq, vcvttps2qq and
+	vcvttps2uqq.
+	* i386-tbl.h: Regenerated.
+
 2018-07-18  Nick Clifton  <nickc@redhat.com>
 
 	2.31.1 Release point.
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index ba2af7bfc2..e59240c98d 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -698,7 +698,7 @@ struct operand_qualifier_data aarch64_opnd_qualifiers[] =
   {4, 1, 0x2, "s", OQK_OPD_VARIANT},
   {8, 1, 0x3, "d", OQK_OPD_VARIANT},
   {16, 1, 0x4, "q", OQK_OPD_VARIANT},
-  {1, 4, 0x0, "4b", OQK_OPD_VARIANT},
+  {4, 1, 0x0, "4b", OQK_OPD_VARIANT},
 
   {1, 4, 0x0, "4b", OQK_OPD_VARIANT},
   {1, 8, 0x0, "8b", OQK_OPD_VARIANT},
@@ -2501,6 +2501,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
       else
 	num = 16;
       num = num / aarch64_get_qualifier_esize (qualifier) - 1;
+      assert (aarch64_get_qualifier_nelem (qualifier) == 1);
 
       /* Index out-of-range.  */
       if (!value_in_range_p (opnd->reglane.index, 0, num))
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index b6cccc5233..bc97bc2617 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -141,6 +141,8 @@ enum opcode_sentinel_enum
 } opcode_sentinels;
 
 #define UNDEFINED_INSTRUCTION      "\t\t; <UNDEFINED> instruction: %0-31x"
+#define UNKNOWN_INSTRUCTION_32BIT  "\t\t; <UNDEFINED> instruction: %08x"
+#define UNKNOWN_INSTRUCTION_16BIT  "\t\t; <UNDEFINED> instruction: %04x"
 #define UNPREDICTABLE_INSTRUCTION  "\t; <UNPREDICTABLE>"
 
 /* Common coprocessor opcodes shared between Arm and Thumb-2.  */
@@ -5188,7 +5190,8 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
 	  return;
 	}
     }
-  abort ();
+  func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
+  return;
 }
 
 /* Print one 16-bit Thumb instruction from PC on INFO->STREAM.  */
@@ -5459,7 +5462,8 @@ print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
       }
 
   /* No match.  */
-  abort ();
+  func (stream, UNKNOWN_INSTRUCTION_16BIT, (unsigned)given);
+  return;
 }
 
 /* Return the name of an V7M special register.  */
@@ -6083,7 +6087,8 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
       }
 
   /* No match.  */
-  abort ();
+  func (stream, UNKNOWN_INSTRUCTION_32BIT, (unsigned)given);
+  return;
 }
 
 /* Print data bytes on INFO->STREAM.  */
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 42d219cb11..78436879fb 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -12321,7 +12321,7 @@ static const struct dis386 rm_table[][8] = {
   },
   {
     /* RM_0F01_REG_0 */
-    { Bad_Opcode },
+    { "enclv",		{ Skip_MODRM }, 0 },
     { "vmcall",		{ Skip_MODRM }, 0 },
     { "vmlaunch",	{ Skip_MODRM }, 0 },
     { "vmresume",	{ Skip_MODRM }, 0 },
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index 9a22b3c95f..f43b5e11eb 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -736,23 +736,23 @@ enum
   RegMem,
   /* Memory.  */
   Mem,
-  /* BYTE memory. */
+  /* BYTE size. */
   Byte,
-  /* WORD memory. 2 byte */
+  /* WORD size. 2 byte */
   Word,
-  /* DWORD memory. 4 byte */
+  /* DWORD size. 4 byte */
   Dword,
-  /* FWORD memory. 6 byte */
+  /* FWORD size. 6 byte */
   Fword,
-  /* QWORD memory. 8 byte */
+  /* QWORD size. 8 byte */
   Qword,
-  /* TBYTE memory. 10 byte */
+  /* TBYTE size. 10 byte */
   Tbyte,
-  /* XMMWORD memory. */
+  /* XMMWORD size. */
   Xmmword,
-  /* YMMWORD memory. */
+  /* YMMWORD size. */
   Ymmword,
-  /* ZMMWORD memory.  */
+  /* ZMMWORD size.  */
   Zmmword,
   /* Unspecified memory size.  */
   Unspecified,
diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
index fad588ae3f..99f4d6635a 100644
--- a/opcodes/i386-opc.tbl
+++ b/opcodes/i386-opc.tbl
@@ -4100,6 +4100,7 @@ xsavec64, 1, 0xfc7, 0x4, 2, CpuXSAVEC|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No
 
 encls, 0, 0xf01cf, None, 3, CpuSE1, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
 enclu, 0, 0xf01d7, None, 3, CpuSE1, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
+enclv, 0, 0xf01c0, None, 3, CpuSE1, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
 
 // SGX instructions end.
 
@@ -5408,11 +5409,13 @@ vcvtpd2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|
 vcvtpd2uqq, 3, 0x6679, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=2|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|StaticRounding|SAE, { Imm8, RegZMM, RegZMM }
 
 vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
-vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
+vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
+vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
 vcvtps2qq, 2, 0x667B, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
 vcvtps2qq, 3, 0x667B, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|StaticRounding|SAE, { Imm8, RegYMM, RegZMM }
 vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
-vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
+vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
+vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
 vcvtps2uqq, 2, 0x6679, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
 vcvtps2uqq, 3, 0x6679, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|StaticRounding|SAE, { Imm8, RegYMM, RegZMM }
 
@@ -5442,11 +5445,13 @@ vcvttpd2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3
 vcvttpd2uqq, 3, 0x6678, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=2|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|SAE, { Imm8, RegZMM, RegZMM }
 
 vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
-vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
+vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
+vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
 vcvttps2qq, 2, 0x667A, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
 vcvttps2qq, 3, 0x667A, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|SAE, { Imm8, RegYMM, RegZMM }
 vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=5|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegYMM|Dword|YMMword|Unspecified|BaseIndex, RegZMM }
-vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|Qword|Unspecified|BaseIndex, RegXMM }
+vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM, RegXMM }
+vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=2|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=3|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Dword|Qword|Unspecified|BaseIndex, RegXMM }
 vcvttps2uqq, 2, 0x6678, None, 1, CpuAVX512DQ|CpuAVX512VL, Modrm|EVex=3|Masking=3|VexOpcode=0|VexW=1|Broadcast|Disp8MemShift=4|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { RegXMM|Dword|XMMword|Unspecified|BaseIndex, RegYMM }
 vcvttps2uqq, 3, 0x6678, None, 1, CpuAVX512DQ, Modrm|EVex=1|Masking=3|VexOpcode=0|VexW=1|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|SAE, { Imm8, RegYMM, RegZMM }
 
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
index d513275deb..42ac313eca 100644
--- a/opcodes/i386-tbl.h
+++ b/opcodes/i386-tbl.h
@@ -83658,6 +83658,20 @@ const insn_template i386_optab[] =
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0 } } } },
+  { "enclv", 0, 0xf01c0, None, 3,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0 } },
+    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
+      1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0 },
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0 } } } },
   { "vcvtpd2udqx", 2, 0x79, None, 1,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,
@@ -87881,6 +87895,23 @@ const insn_template i386_optab[] =
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
 	  0, 0, 0 } } } },
+  { "vcvtps2qq", 2, 0x667B, None, 1,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0 } },
+    { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
+      1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0 },
+    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } },
+      { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } } } },
   { "vcvtps2qq", 2, 0x667B, None, 1,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
@@ -87892,8 +87923,8 @@ const insn_template i386_optab[] =
       1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
       0, 0 },
-    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
-	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
 	  0, 0, 0 } },
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
@@ -87952,6 +87983,23 @@ const insn_template i386_optab[] =
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
 	  0, 0, 0 } } } },
+  { "vcvtps2uqq", 2, 0x6679, None, 1,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0 } },
+    { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
+      1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0 },
+    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } },
+      { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } } } },
   { "vcvtps2uqq", 2, 0x6679, None, 1,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
@@ -87963,8 +88011,8 @@ const insn_template i386_optab[] =
       1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
       0, 0 },
-    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
-	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
 	  0, 0, 0 } },
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
@@ -88412,6 +88460,23 @@ const insn_template i386_optab[] =
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
 	  0, 0, 0 } } } },
+  { "vcvttps2qq", 2, 0x667A, None, 1,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0 } },
+    { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
+      1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0 },
+    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } },
+      { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } } } },
   { "vcvttps2qq", 2, 0x667A, None, 1,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
@@ -88423,8 +88488,8 @@ const insn_template i386_optab[] =
       1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
       0, 0 },
-    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
-	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
 	  0, 0, 0 } },
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
@@ -88483,6 +88548,23 @@ const insn_template i386_optab[] =
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
 	  0, 0, 0 } } } },
+  { "vcvttps2uqq", 2, 0x6678, None, 1,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0 } },
+    { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
+      1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+      0, 0 },
+    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } },
+      { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
+	  0, 0, 0 } } } },
   { "vcvttps2uqq", 2, 0x6678, None, 1,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
@@ -88494,8 +88576,8 @@ const insn_template i386_optab[] =
       1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 1, 0, 0, 0, 0, 0, 2, 3, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0,
       0, 0 },
-    { { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
-	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0,
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+	  0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,
 	  0, 0, 0 } },
       { { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 	  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
index ef75e38e7e..d8a9cce1e2 100644
--- a/opcodes/s390-opc.txt
+++ b/opcodes/s390-opc.txt
@@ -1126,7 +1126,7 @@ e561 tbeginc SIL_RDU "constrained transaction begin" zEC12 zarch htm
 b2f8 tend S_00 "transaction end" zEC12 zarch htm
 c7 bpp SMI_U0RDP "branch prediction preload" zEC12 zarch
 c5 bprp MII_UPP "branch prediction relative preload" zEC12 zarch
-b2e8 ppa RRF_U0RR "perform processor assist" zEC12 zarch
+b2e8 ppa RRF_U0RR "perform processor assist" zEC12 zarch htm
 b2fa niai IE_UU "next instruction access intent" zEC12 zarch
 b98f crdte RRF_RURR2 "compare and replace DAT table entry" zEC12 zarch optparm
 e3000000009f lat RXY_RRRD "load and trap 32 bit" zEC12 zarch