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
|
2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
* archures.c (bfd_architecture): Add bfd_arch_l1om.
(bfd_l1om_arch): New.
(bfd_archures_list): Add &bfd_l1om_arch.
* bfd-in2.h: Regenerated.
* config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
if bfd_elf64_x86_64_freebsd_vec is supported.
(targ_selvecs): Likewise.
* configure.in: Support bfd_elf64_l1om_vec and
bfd_elf64_l1om_freebsd_vec.
* configure: Regenerated.
* cpu-l1om.c: New.
* elf64-x86-64.c (elf64_l1om_elf_object_p): New.
(bfd_elf64_l1om_vec): Likewise.
(bfd_elf64_l1om_freebsd_vec): Likewise.
* Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
(ALL_MACHINES_CFILES): Add cpu-l1om.c.
* Makefile.in: Regenerated.
* targets.c (bfd_elf64_l1om_vec): New.
(bfd_elf64_l1om_freebsd_vec): Likewise.
(_bfd_target_vector): Add bfd_elf64_l1om_vec and
bfd_elf64_l1om_freebsd_vec.
2009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
Alan Modra <amodra@bigpond.net.au>
* reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
(spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
(spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
2009-07-23 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10434
* elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
instead of shared for R_X86_64_TPOFF32.
(elf64_x86_64_relocate_section): Likewise.
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
* elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
with the BSF_GNU_UNIQUE flag bit set.
* elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
for symbols with STB_GNU_UNIQUE binding.
* elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
with the STB_GNU_UNIQUE binding.
(elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
symbols with the unique_global field set.
(elf_link_output_extsym): Set unique_global field for symbols with
the STB_GNU_UNIQUE binding.
* syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
(bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
symbols.
(bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
symbols.
* bfd-in2.h: Regenerate.
2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (elf_link_output_extsym): Revert the last change.
2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10433
* elflink.c (elf_link_output_extsym): Special case ifunc syms
when ref_regular, not def_regular.
2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10426
* elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
from a DSO into a normal FUNC symbol.
(elf_link_output_extsym): Turn an undefined IFUNC symbol into
a normal FUNC symbol.
2009-07-17 Chao-ying Fu <fu@mips.com>
* elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
(_bfd_mips_elf_size_dynamic_sections): For CPUs without load
interlocking, the last PLT entry needs a nop in the branch delay slot.
(_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
output the last two PLT entries in reverse order.
2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_relocate_section): Don't get local
STT_GNU_IFUNC symbol for relocatable link.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
* bfdio.c (bfd_iovec): Add comments for bmmap.
* bfd-in2.h: Regenerated.
2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerated.
2009-07-10 Doug Kwan <dougkwan@google.com>
* elf32-arm.c (stub_hash_newfunc): Initialize fields
target_addend and orig_insn.
2009-07-10 Tom Tromey <tromey@redhat.com>
* Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
(elf-eh-frame.lo): Likewise.
(elf32-bfin.lo): Likewise.
(elf32-frv.lo): Likewise.
(elf32-xc16x.lo): Likewise.
* Makefile.in: Rebuild.
* dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
* elf-eh-frame.c: Likewise.
* elf32-bfin.c: Likewise.
* elf32-frv.c: Likewise.
* elf32-xc16x.c: Likewise.
2009-07-10 Julian Brown <julian@codesourcery.com>
* elf32-arm.c (arm_build_one_stub): Use the hash entry of the
symbol a stub entry is derived from, not the entry for the stub
itself, in call to elf32_arm_final_link_relocate.
2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
when reporting addends.
2009-07-10 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
data even when no stubs.
(spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
2009-07-10 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
(ppc_elf_get_synthetic_symtab): Report addend.
(PLT_IFUNC): Define.
(struct ppc_elf_link_hash_table): Add iplt and reliplt.
(ppc_elf_create_glink): New function.
(ppc_elf_create_dynamic_sections): Use it.
(ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
(update_local_sym_info): Allocate space for local_plt array.
Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
entry pointer.
(is_branch_reloc): New function.
(ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
(ppc_elf_gc_sweep_hook): Likewise.
(ppc_elf_adjust_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(ppc_elf_size_dynamic_sections): Likewise.
(ppc_elf_relocate_section): Likewise.
(branch_reloc_hash_match): Use is_branch_reloc.
(ppc_elf_tls_optimize): Adjust for local_plt.
(write_glink_stub): New function, extracted from..
(ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
(ppc_elf_finish_dynamic_sections): Only write plt resolver and
branch table when dynamic.
(elf_backend_post_process_headers): Define.
* elf64-ppc.c (elf_backend_post_process_headers): Define.
(ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
(ppc64_elf_get_synthetic_symtab): Report addend.
(struct ppc_stub_hash_entry): Add plt_ent.
(PLT_IFUNC): Define.
(struct ppc_link_hash_table): Add iplt and reliplt.
(create_linkage_sections): Make .iplt and .rela.iplt sections.
(ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
(update_local_sym_info): Allocate space for local_plt array.
Don't bump local_got_ents for PLT_IFUNC. Return local_plt
entry pointer.
(update_plt_info): Pass pointer to plt_entry rather than sym hash,
and don't change hash flags here.
(is_branch_reloc): New function.
(ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
(ppc64_elf_gc_sweep_hook): Likewise.
(ppc64_elf_adjust_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(ppc64_elf_size_dynamic_sections): Likewise.
(ppc_build_one_stub, ppc_size_one_stub): Likewise.
(ppc64_elf_size_stubs): Likewise.
(ppc64_elf_relocate_section): Likewise.
(get_sym_h): Adjust for local_plt.
(branch_reloc_hash_match): Use is_branch_reloc.
(ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
(ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
2009-07-10 Alan Modra <amodra@bigpond.net.au>
* elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
2009-07-10 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
and ref_regular_nonweak comment.
* elflink.c (elf_link_output_extsym): Special case ifunc syms
when def_regular, not ref_regular.
(elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
* elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
* elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
2009-07-09 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
of malloc'd struct call_info.
(pasted_function): Likewise, priority too.
2009-07-07 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_auto_overlay): Take into account section
alignment when packing sections into overlays.
2009-07-03 Cary Coutant <ccoutant@google.com>
* dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
2009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
* coffcode.h (sec_to_styp_flags): Partially revert (functional
changes only) earlier patch:-
2009-06-25 Kai Tietz <kai.tietz@onevision.com>
* coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
give .debug and .reloc data characteristics.
(DOT_RELOC): New define for .reloc section string.
(coff_write_object_contents): Use DOT_RELOC instead of string.
2009-07-02 Tom Tromey <tromey@redhat.com>
* aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
* bfdwin.c (bfd_free_window): Cast to unsigned long.
2009-07-01 Nick Clifton <nickc@redhat.com>
* elf-m10300.c: Remove trailing white space.
* reloc.c: Likewise.
2009-07-01 Douglas B Rupp <rupp@gnat.com>
* bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
* configure.in: Use them.
* configure: Regenerate.
* config.in: Regnerate.
* vmsutil.c: Include sysdep.h, remove ansidecl.h.
#define _BSD_SOURCE. Add comments.
(vms_file_stats_name): Calculate creation date based on available
runtime data. Return 1 for version instead of 0.
2009-07-01 Nick Clifton <nickc@redhat.com>
PR 10072
* elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
to R_ARM_THM_PC8 relocation.
2009-06-29 Nick Clifton <nickc@redhat.com>
* elf-m10300.c (mn10300_elf_relax_section): Allow for the
different uses of the relocations addend when a symbol is in a
merged section.
2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10337
* elf.c (bfd_section_from_shdr): Don't change sh_link for
SHT_REL/SHT_RELA sections on executable nor shared library.
Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
as a normal section.
2009-06-25 Nick Clifton <nickc@redhat.com>
* elf-m10300.c (mn10300_elf_relax_section): Handle non-section
symbols with SEC_MERGE flag.
2009-06-25 Kai Tietz <kai.tietz@onevision.com>
* coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
give .debug and .reloc data characteristics.
(DOT_RELOC): New define for .reloc section string.
(coff_write_object_contents): Use DOT_RELOC instead of string.
2009-06-25 Tristan Gingold <gingold@adacore.com>
* mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
(bfd_mach_o_canonicalize_dynamic_symtab)
(bfd_mach_o_get_synthetic_symtab): Defines.
(TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
(TARGET_NAME): Use Mach-O specific functions for dynamic.
* mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
for scattered relocations.
(bfd_mach_o_i386_print_thread): New function.
(bfd_mach_o_print_thread): Define.
* mach-o.c (text_section_names_xlat): Add an entry for __const.
(bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
New functions extracted from ...
(bfd_mach_o_canonicalize_reloc): ... This. Simplified.
(bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
(bfd_mach_o_canonicalize_dynamic_reloc): New function.
(bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
(bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
(bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
Set name_str field.
(bfd_mach_o_scan_read_dylib): Ditto.
(bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
reindent.
(bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
decode isym and flags on little endian targets. Set dysymtab field.
(bfd_mach_o_scan_start_address): Adjust for enum names.
(bfd_mach_o_lookup_section): Do not look for segments anymore.
(bfd_mach_o_print_section): Display bfd section name.
(bfd_mach_o_print_segment): Display none if no name.
(bfd_mach_o_print_dysymtab): Display next index for local, external
and undefined symbols.
(bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
Display dylinker name. Display thread and unixthread commands content.
(bfd_mach_o_print_thread): New macro.
* mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
(bfd_mach_o_ppc_thread_flavour): Ditto.
(bfd_mach_o_i386_thread_flavour): Ditto.
(BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
(BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
BFD_MACH_O_THREAD_STATE_NONE.
(bfd_mach_o_segment_command): Remove segment field.
(bfd_mach_o_thread_flavour): Field offset is now unsigned long.
(bfd_mach_o_dylinker_command): Remove section field, add name_str.
(bfd_mach_o_prebound_dylib_command): Ditto.
(bfd_mach_o_dylib_command): Ditto.
(bfd_mach_o_prebound_dylib_command): Remove section field.
(mach_o_data_struct): Add dysymtab field.
(bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
(bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
(bfd_mach_o_build_commands): Remove parameter names and attributes.
(bfd_mach_o_get_dynamic_reloc_upper_bound)
(bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
2009-06-25 Rafael Avila de Espindola <espindola@google.com>
* plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
field of struct dirent.
2009-06-23 Tristan Gingold <gingold@adacore.com>
* vms.c (vms_get_synthetic_symtab): Remove duplicate definition
of this macro. Fix indentation.
2009-06-22 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
destination for defined dynamic symbols when deciding whether to
insert a stub or not.
(allocate_dynrelocs): Make sure functions are not marked as Thumb
when actually accessed through a PLT, even when generating a
shared lib.
2009-06-22 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
the relocs array.
2009-06-22 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
* elf32-v850.c (v850_elf_relocate_section): Warning fix.
2009-06-22 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (elf_link_add_object_symbols): Avoid warning
from -Wjump-misses-init in gcc 4.5.0.
2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Properly check local
symbol on error.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_tls_transition): Add a parameter,
r_symndx. Report local symbol name on error.
(elf_i386_check_relocs): Updated. Report local symbol name on
error.
(elf_i386_gc_sweep_hook): Updated.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
r_symndx. Report local symbol name on error.
(elf64_x86_64_check_relocs): Updated. Report local symbol name
on error.
(elf64_x86_64_gc_sweep_hook): Updated.
(elf64_x86_64_relocate_section): Likewise.
2009-06-19 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_print_private_header): Fix format character.
2009-06-19 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
(bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
(bfd_mach_o_valid): Ditto.
(bfd_mach_o_wide_p): Ditto.
(bfd_mach_o_canonicalize_reloc): Ditto.
(bfd_mach_o_build_commands): Ditto.
(bfd_mach_o_scan_read_thread): Ditto.
(bfd_mach_o_flatten_sections): Ditto.
(bfd_mach_o_scan_start_address): Ditto.
(bfd_mach_o_lookup_section): Ditto.
(bfd_mach_o_core_fetch_environment): Ditto.
(bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
(bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
(bfd_mach_o_scan_write_symtab): Ditto.
Use macros instead of hard-coded values.
(bfd_mach_o_scan_read_symtab_symbol): Make the function static.
Use bfd_mach_o_get_data instead of direct access. Use macros
instead of hard-coded values.
(bfd_mach_o_scan_read_symtab_strtab): Make the function static.
Remove sym argument and get section from mdata.
Move code into the else branch.
(bfd_mach_o_scan_read_symtab_symbols): Make the function static.
Remove sym argument and get section from mdata. Adjust code.
(bfd_mach_o_scan_read_dylib): Move assertion into the created
switch (which replaces consecutive if statements).
(bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
module table, table of content, indirect symbols and external
referenced symbols.
(bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
field.
(bfd_mach_o_scan_read_linkedit): New function.
(bfd_mach_o_scan_read_str): Ditto.
(bfd_mach_o_count_symbols): Simplify the code by using the symtab
field of mdata.
(bfd_mach_o_get_symtab_upper_bound): Remove check as
bfd_mach_o_count_symbols never returns an error.
(bfd_mach_o_canonicalize_symtab): Simplify the code by using the
symtab field (there might be only one symtab).
(bfd_mach_o_scan_read_command): Handle reexported dylib.
Handle sub frameworks, sub umbrella, sub library and sub client.
Read code signature and segment split info commands.
(bfd_mach_o_scan): Reindent.
(bfd_mach_o_xlat_name): New type.
(bfd_mach_o_print_flags): New function.
(bfd_mach_o_get_name): Ditto.
(bfd_mach_o_cpu_name): New variable.
(bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
(bfd_mach_o_section_type_name)
(bfd_mach_o_section_attribute_name)
(bfd_mach_o_load_command_name): New variables.
(bfd_mach_o_print_private_header): New function.
(bfd_mach_o_print_section_map): New function extracted from
bfd_mach_o_print_private_bfd_data.
(bfd_mach_o_print_section): Ditto. Print more infos.
(bfd_mach_o_print_segment): Ditto.
(bfd_mach_o_print_dysymtab): Ditto.
(bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
load weak dylib, reexport dylib and id dylib.
Handle code signature and segment_split info.
Handle sub frameworks, sub umbrella, sub library and sub client.
(bfd_mach_o_section_get_nbr_indirect): New function.
* mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
(bfd_mach_o_header_flags): New enum to define header flags.
(bfd_mach_o_section_attribute): New enum to replace ...
(BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
these removed macros.
(BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
(bfd_mach_o_dylib_module): New type.
(BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
macros.
(bfd_mach_o_dylib_table_of_content): New type.
(BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
(bfd_mach_o_dylib_reference): New type.
(BFD_MACH_O_REFERENCE_SIZE): New macro.
(bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
modules, toc, references and indirect syms.
(BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
(bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
unused). Add comment.
(bfd_mach_o_dylib_command): Ditto.
(bfd_mach_o_prebound_dylib_command): Ditto.
(bfd_mach_o_linkedit_command): New type.
(bfd_mach_o_str_command): New type.
(bfd_mach_o_load_command): Add linkedit and str fields.
(mach_o_data_struct): Add symtab field.
(bfd_get_mach_o_data): Renamed to ...
(bfd_mach_o_get_data): ... this new macro.
(bfd_mach_o_scan_read_symtab_symbol,
bfd_mach_o_scan_read_symtab_strtab,
bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
* mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
instead of direct access.
2009-06-19 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
R_PPC_PLTREL24 relocs.
(ppc_elf_relocate_section): Likewise.
2009-06-19 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
pointer to sym hash. Update all uses.
(update_plt_info): Likewise. Don't check addend here.
2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
bfd_sym_from_r_symndx.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2009-06-18 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct sym_sec_cache): Delete.
(struct sym_cache): New.
(bfd_section_from_r_symndx): Delete prototype.
(bfd_sym_from_r_symndx): Define prototype.
* elf.c (bfd_section_from_r_symndx): Delete, replace with..
(bfd_sym_from_r_symndx): ..new function.
* elf32-arm.c: Update all uses of struct sym_sec_cache and
bfd_section_from_r_symndx to new struct and function.
* elf32-bfin.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m32r.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-m68hc1x.h: Likewise.
* elf32-m68k.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-s390.c: Likewise.
* elf32-sh.c: Likewise.
* elf64-ppc.c: Likewise.
* elf64-s390.c: Likewise.
* elf64-x86-64.c: Likewise.
* elfxx-sparc.c: Likewise.
* elfxx-sparc.h: Likewise.
2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2009-06-18 Nick Clifton <nickc@redhat.com>
* elflink.c (elf_link_sort_relocs): Return early if there are no
relocs to sort.
2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
Merge cegcc and mingw32ce target name changes from
CeGCC project:
2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
* config.bfd: Add arm*-*-cegcc* target.
2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
* config.bfd: Add arm-*-mingw32ce* target.
2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
* elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
* elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
* elf32-i386.c (elf_i386_check_relocs): Use it.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (elf_dyn_relocs): New.
* elf32-i386.c (elf_i386_dyn_relocs): Removed.
(elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
elf_dyn_relocs.
(elf_i386_copy_indirect_symbol): Likewise.
(elf_i386_check_relocs): Likewise.
(elf_i386_gc_sweep_hook): Likewise.
(elf_i386_allocate_dynrelocs): Likewise.
(elf_i386_readonly_dynrelocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
* elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
(elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
with elf_dyn_relocs.
(elf64_x86_64_copy_indirect_symbol): Updated.
(elf64_x86_64_check_relocs): Likewise.
(elf64_x86_64_gc_sweep_hook): Likewise.
(elf64_x86_64_adjust_dynamic_symbol): Likewise.
(elf64_x86_64_allocate_dynrelocs): Likewise.
(elf64_x86_64_readonly_dynrelocs): Likewise.
(elf64_x86_64_size_dynamic_sections): Likewise.
2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
* elf32-arm.c (create_got_section): Get existing .rela.got
section.
* elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
* elf32-lm32.c (create_got_section): Likewise.
* elf32-m32r.c (create_got_section): Likewise.
* elf32-ppc.c (ppc_elf_create_got): Likewise.
* elf32-s390.c (create_got_section): Likewise.
* elf32-sh.c (create_got_section): Likewise.
* elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
* elf64-s390.c (create_got_section): Likewise.
* elfxx-sparc.c (create_got_section): Likewise.
* elflink.c (_bfd_elf_create_got_section): Properly initialize
the GOT size.
2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
* elf32-i386.c (elf_i386_local_hash): Removed.
(elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
(elf_i386_get_local_sym_hash): Likewise.
* elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
(elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
(elf64_x86_64_get_local_sym_hash): Likewise.
* elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
(get_local_sym_hash): Likewise.
2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
rel_got_sec and plt_sec.
(elfNN_ia64_relax_section): Updated.
(elfNN_ia64_create_dynamic_sections): Likewise.
(get_got): Likewise.
(allocate_dynrel_entries): Likewise.
(elfNN_ia64_size_dynamic_sections): Likewise.
(set_got_entry): Likewise.
(elfNN_ia64_choose_gp): Likewise.
(elfNN_ia64_relocate_section): Likewise.
(elfNN_ia64_finish_dynamic_symbol): Likewise.
(elfNN_ia64_finish_dynamic_sections): Likewise.
2009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
also for calls.
2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
* configure.in (elf): Add elf-ifunc.lo.
* configure: Regenerated.
* Makefile.in: Likewise.
* elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
* elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
irelifunc.
(elf_i386_link_hash_table_create): Likewise.
(elf_i386_create_dynamic_sections): Likewise.
(elf_i386_check_relocs): Likewise.
(elf_i386_allocate_dynrelocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_finish_dynamic_symbol): Likewise.
(elf_i386_finish_dynamic_sections): Likewise.
(elf_i386_create_got_section): Removed.
* elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
irelifunc.
(elf64_x86_64_compute_jump_table_size): Updated.
(elf64_x86_64_link_hash_table_create): Likewise.
(elf64_x86_64_create_dynamic_sections): Likewise.
(elf64_x86_64_check_relocs): Likewise.
(elf64_x86_64_allocate_dynrelocs): Likewise.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_finish_dynamic_symbol): Likewise.
(elf64_x86_64_finish_dynamic_sections): Likewise.
(elf64_x86_64_create_got_section): Removed.
* elflink.c (_bfd_elf_create_got_section): Use log_file_align
for pointer alignment. Set up section pointers.
(_bfd_elf_create_dynamic_sections): Likewise.
(_bfd_elf_create_ifunc_sections): Moved to ...
* elf-ifunc.c: Here. New.
* Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
(BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
Run "make dep-am".
2009-06-16 Doug Kwan <dougkwan@google.com>
* elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
to bfd_signed_vma. Cast constant operands which are used in
offset related expressions to bfd_signed_vma type as appropriate.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_reloc_type_class): New function.
(elf_backend_reloc_type_class): Define.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_relocate_section): For symbol references
from an executable to a shared library treat R_VAX_PC32
relocations as R_VAX_PLT32 ones.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
symbols in GOT space calculation.
(elf_vax_relocate_section): Adjust accordingly.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
include <R11:R2>.
2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
* elf32-vax.c (elf_vax_check_relocs): Handle the visibility
attribute.
(elf_vax_relocate_section): Likewise.
2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Reformat.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerated.
2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2009-06-15 Nick Clifton <nickc@redhat.com>
* po/ru.po: New Russian translation.
* configure.in (ALL_LINGUAS): Add ru.
* configure: Regenerate.
2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c: Remove duplicated comments.
2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10270
* elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
dynamic IFUNC pointer in non-shared object. Use .got.plt
for IFUNC definition in PIE.
(elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
PIE locally.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
dynamic IFUNC pointer in non-shared object. Use .got.plt
for IFUNC definition in PIE.
(elf64_x86_64_relocate_section): Resolve IFUNC definition in
PIE locally.
2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Properly report
local symbol for unhandled relocation against STT_GNU_IFUNC
symbol.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
(elf64_x86_64_relocate_section): Likewise.
2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10269
* elf32-i386.c: Include "objalloc.h" and "hashtab.h".
(elf_i386_link_hash_table): Add loc_hash_table and
loc_hash_memory.
(elf_i386_local_hash): New.
(elf_i386_local_htab_hash): Likewise.
(elf_i386_local_htab_eq): Likewise.
(elf_i386_get_local_sym_hash): Likewise.
(elf_i386_link_hash_table_free): Likewise.
(elf_i386_allocate_local_dynrelocs): Likewise.
(elf_i386_finish_local_dynamic_symbol): Likewise.
(bfd_elf64_bfd_link_hash_table_free): Likewise.
(elf_i386_link_hash_table_create): Create loc_hash_table and
loc_hash_memory.
(elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_finish_dynamic_sections): Likewise.
(elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
isn't NULL.
* elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
(elf64_x86_64_link_hash_table): Add loc_hash_table and
loc_hash_memory.
(elf64_x86_64_local_hash): New.
(elf64_x86_64_local_htab_hash): Likewise.
(elf64_x86_64_local_htab_eq): Likewise.
(elf64_x86_64_get_local_sym_hash): Likewise.
(elf64_x86_64_link_hash_table_free): Likewise.
(elf64_x86_64_allocate_local_dynrelocs): Likewise.
(elf64_x86_64_finish_local_dynamic_symbol): Likewise.
(bfd_elf64_bfd_link_hash_table_free): Likewise.
(elf64_x86_64_link_hash_table_create): Create loc_hash_table
and loc_hash_memory.
(elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
symbols.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_finish_dynamic_sections): Likewise.
(elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
sym isn't NULL.
2009-06-10 Philip Blundell <philb@gnu.org>
* elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
elf_sec->this_hdr == NULL.
2009-06-12 Tristan Gingold <gingold@adacore.com>
* reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
* bfd-in2.h: Regenerated.
* libbfd.h: Regenerated.
* mach-o.c (FILE_ALIGN): New macro.
(bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
(bfd_mach_o_print_symbol): Ditto.
(bfd_mach_o_scan_write_thread): Adjust type of variable offset.
(bfd_mach_o_get_reloc_upper_bound): New function.
(bfd_mach_o_canonicalize_reloc): Ditto.
(bfd_mach_o_scan_write_relocs): Ditto.
(bfd_mach_o_scan_write_section_32): Remove offset argument.
(bfd_mach_o_scan_write_section_64): Ditto.
(bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
written for load command. Do not compute section file offset.
(bfd_mach_o_scan_write_segment_64): Ditto.
(bfd_mach_o_scan_write_symtab): Compute file offset first.
Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
Mach-O to ...
(bfd_mach_o_mangle_symbols): ... this new function.
(bfd_mach_o_write_contents): Be sure to have load commands built.
Call bfd_mach_o_mangle_symbols.
(bfd_mach_o_build_commands): Adjust for filelen field.
Use FILE_ALIGN macro. Clear section file offset if section is empty.
Do not set symtab file offset anymore here.
(bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
(bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
Set reloc_count and rel_filepos section fields.
(bfd_mach_o_scan_read_section_32): Type of argument offset is now
unsigned int.
(bfd_mach_o_scan_read_section_64): Ditto.
(bfd_mach_o_scan_read_section): Ditto.
(bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
bfd_mach_o_asymbol. Use unsigned int for file offset type.
(bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
Handle weak-ref symbols.
(bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
(bfd_mach_o_scan): Remove assignment to removed field.
(bfd_mach_o_mkobject_init): Ditto.
(bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
(bfd_mach_o_bfd_reloc_type_lookup): New macro.
(bfd_mach_o_bfd_reloc_name_lookup): Ditto.
(bfd_mach_o_swap_reloc_in): Ditto.
(bfd_mach_o_swap_reloc_out): Ditto.
* mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
(BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
(BFD_MACH_O_REFERENCE_FLAG_DEFINED)
(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
(BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
(BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
(BFD_MACH_O_N_WEAK_DEF): New macros.
Add comments.
(bfd_mach_o_section_type): Add new enumeration values.
(BFD_MACH_O_S_SELF_MODIFYING_CODE)
(BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
(BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
(BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
macros.
(BFD_MACH_O_GENERIC_RELOC_VANILLA)
(BFD_MACH_O_GENERIC_RELOC_PAIR)
(BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
(BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
(BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
(BFD_MACH_O_RELENT_SIZE): Ditto.
(BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
(BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
(BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
(BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
(BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
(BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
(BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
(BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
(bfd_mach_o_reloc_info): New struct.
(bfd_mach_o_asymbol): New struct.
(bfd_mach_o_symtab_command): The symbols field is now of type
bfd_mach_o_asymbol.
(bfd_mach_o_load_command): The offset and len fields are now of type
unsigned int.
(mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
Add a filelen field. Add comments.
(bfd_mach_o_backend_data): New struct.
(bfd_mach_o_get_backend_data): New macro.
(bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
bfd_mach_o_asymbol.
(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
(bfd_mach_o_get_reloc_upper_bound): New prototype.
(bfd_mach_o_canonicalize_reloc): Ditto.
* mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
duplicated macro. Now defined to _bfd_generic_is_local_label.
(TARGET_NAME_BACKEND): New macro...
(TARGET_NAME_BACKEND): ... used to name a new variable.
(TARGET_NAME): Define relocs table using bfd_mach_o, reference
Mach-O backend data.
* mach-o-i386.c (i386_howto_table): New variable.
(bfd_mach_o_i386_swap_reloc_in): New function.
(bfd_mach_o_i386_swap_reloc_out): Ditto.
(bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
(bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
(bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
(bfd_mach_o_bfd_reloc_type_lookup)
(bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2009-06-11 Eric Paris <eparis@redhat.com>
Nick Clifton <nickc@redhat.com>
* opncls.c (_maybe_make_executable): New function. Gives execute
permission to an executable bfd that was opened for writing
provided that it is a regular file. Replaces common code found in...
(bfd_close): here and ...
(bfd_close_all_done): here.
2009-06-11 Anthony Green <green@moxielogic.com>
* reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
relocation support.
(moxie_reloc_map): Ditto.
Clean up copyright notice.
2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
* bfd-in2.h: bfd_mmap prototype.
* bfdio.c (bfd_mmap): New function.
* libbfd.h (bfd_iovec): Add bmmap.
* cache.c (cache_bmmap): New function.
(cache_iovec): Initialize bmmap member.
* opencls.c (opncls_bmmap): New function.
(opncls_iovec): Initialize bmmap member.
2009-06-09 Tristan Gingold <gingold@adacore.com>
* mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
and stabstr_segment fields.
(mach_o_be_vec, mach_o_le_vec): Removed
(bfd_mach_o_version): New prototype.
* mach-o.c (bfd_mach_o_version): Make this function public.
(mach_o_wide_p): New function.
(bfd_mach_o_wide_p): Ditto.
(bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
weird names.
(bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
Search in the list only if the name starts with a dot.
(bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
test. Check bfd_seek status.
(bfd_mach_o_scan_write_thread): Check bfd_seek status.
(bfd_mach_o_scan_write_section_32): Ditto.
(bfd_mach_o_scan_write_section_64): Ditto.
(bfd_mach_o_scan_write_section): Removed.
(bfd_mach_o_scan_write_segment): Split into ...
(bfd_mach_o_scan_write_segment_32): ... this and ...
(bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
(bfd_mach_o_scan_write_symtab_symbols): Moved into ...
(bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
symbol table. Now returns a boolean.
(bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
Adjust for status type.
(bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
test. Write symbol table. Numbers the sections.
(bfd_mach_o_read_header): Check bfd_seek status.
Use mach_o_wide_p instead of hard-coded test.
(bfd_mach_o_scan_read_section_32): Check bfd_seek status.
(bfd_mach_o_scan_read_section_64): Ditto.
(bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
handled common symbols.
(bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
(bfd_mach_o_scan_read_dylinker): Ditto.
(bfd_mach_o_scan_read_dylib): Ditto.
(bfd_mach_o_scan_read_thread): Ditto.
(bfd_mach_o_scan_read_symtab): Ditto.
Do not create a section for the stabs.
(bfd_mach_o_scan_read_uuid): Check bfd_seek status.
(bfd_mach_o_scan_read_segment): Ditto.
(bfd_mach_o_scan_read_command): Ditto.
(bfd_mach_o_scan_start_address): Ditto.
(bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
(bfd_mach_o_archive_p): Check bfd_seek status.
(bfd_mach_o_core_fetch_environment): Ditto.
* mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
(elf_i386_link_hash_table_create): Initialize irelifunc.
(elf_i386_check_relocs): Updated. Set up irelifunc for
shared objects.
(elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
relocation for non-GOT reference of STT_GNU_IFUNC symbol in
shared objects.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
(elf64_x86_64_link_hash_table_create): Initialize irelifunc.
(elf64_x86_64_check_relocs): Updated. Set up irelifunc for
shared objects.
(elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
relocation for non-GOT reference of STT_GNU_IFUNC symbol in
shared objects.
(elf64_x86_64_relocate_section): Likewise.
* elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
...
(_bfd_elf_create_ifunc_sections): This.
* elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
...
(_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
for shared objects.
2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
relocation for R_386_32 against STT_GNU_IFUNC symbol when
building shared object. Check info->executable instead of
!info->shared when setting non_got_ref.
(elf_i386_allocate_dynrelocs): Allocate dynamic relocation
for non-GOT reference of STT_GNU_IFUNC symbol in shared
object. Allocate GOT relocation agsinst STT_GNU_IFUNC
symbol if needed.
(elf_i386_relocate_section): Output dynamic relocation for
R_386_32 against STT_GNU_IFUNC symbol to get the real
function address when building shared object.
(elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
relocation for STT_GNU_IFUNC symbol in shared object.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
symbol when building shared object. Check info->executable
instead of !info->shared when setting non_got_ref.
(elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
for non-GOT reference of STT_GNU_IFUNC symbol in shared
library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
if needed.
(elf64_x86_64_relocate_section): Output dynamic relocation
for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
function address when building shared object.
(elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
relocation for STT_GNU_IFUNC symbol in shared object.
2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* Makefile.am: Run "make dep-am".
(BFD32_BACKENDS): Add mach-o-i386.lo.
(BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
* Makefile.in: Regenerate.
2009-06-06 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_relocate_section): Match overlay number
when looking for soft-icache stubs.
2009-06-05 Tristan Gingold <gingold@adacore.com>
* mach-o.h: Update copyright year.
(bfd_mach_o_mach_header_magic): New enum.
(bfd_mach_o_cpu_subtype): Now an enum.
(BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
(BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
(BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
(bfd_mach_o_load_command): Field type_required is now a boolean.
Reindent prototypes.
(bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
(bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
(bfd_mach_o_bfd_copy_private_section_data): Ditto.
(bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
(bfd_mach_o_get_symtab_upper_bound): Ditto.
(bfd_mach_o_canonicalize_symtab): Ditto.
(bfd_mach_o_get_symbol_info): Ditto.
(bfd_mach_o_print_symbol): Ditto.
(bfd_mach_o_bfd_print_private_bfd_data): Ditto.
(bfd_mach_o_make_empty_symbol): Ditto.
(bfd_mach_o_write_contents): Ditto.
* mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
bfd_mach_o_mkobject): Defines.
(bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
Do not check with target vector but with flavour.
(struct mach_o_section_name_xlat): New declaration.
(dwarf_section_names_xlat): Ditto.
(text_section_names_xlat): Ditto.
(data_section_names_xlat): Ditto.
(struct mach_o_segment_name_xlat): Ditto.
(segsec_names_xlat): Ditto.
(bfd_mach_o_convert_section_name_to_bfd): New function.
(bfd_mach_o_convert_section_name_to_mach_o): Ditto.
(bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
(bfd_mach_o_bfd_copy_private_section_data): Ditto.
(bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
Accept any input and output flavour. Do not share private data
anymore.
(bfd_mach_o_count_symbols): Add a comment.
(bfd_mach_o_get_symtab_upper_bound): Make it public.
(bfd_mach_o_canonicalize_symtab): Ditto.
(bfd_mach_o_get_symbol_info): Ditto.
(bfd_mach_o_print_symbol): Ditto.
(bfd_mach_o_write_header): Now returns a boolean instead of an int.
Use constants instead of hard-coded values.
(bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
values.
(bfd_mach_o_scan_write_section_64): Ditto.
(bfd_mach_o_scan_write_segment): Ditto.
Do not copy sections anymore.
(bfd_mach_o_write_contents): Make it public.
Remove dead code. Rewrite typeflag assignment.
(bfd_mach_o_build_commands): New function.
(bfd_mach_o_set_section_contents): Ditto.
(bfd_mach_o_make_empty_symbol): Make it public.
(bfd_mach_o_read_header): Make it static.
Convert to bfd_boolean.
Use constants instead of hard-coded values.
(bfd_mach_o_make_bfd_section): Call
bfd_mach_o_convert_section_name_to_bfd to create name.
(bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
values.
(bfd_mach_o_scan_read_section_64): Ditto.
(bfd_mach_o_scan_read_segment): Do not create a bfd section for
a segment anymore. Use constants instead of hard-coded values.
(bfd_mach_o_scan_read_command): Fix style.
(bfd_mach_o_scan): Use constants instead of hard-coded values.
Get rid of BFD_IO_FUNCS.
(bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
(bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
(bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
(bfd_mach_o_object_p): Removed.
(bfd_mach_o_gen_core_p): New function, replaces ...
(bfd_mach_o_core_p): ... deleted.
(bfd_mach_o_bfd_print_private_bfd_data): Make it public.
* mach-o-i386.c: New file.
* config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
* configure.in (TDEFINES): Add mach_o_i386_vec.
* configure: Regenerated.
* targets.c: Add mach_o_i386_vec.
* mach-o.c: Update copyright years.
(BFD_IO_FUNCS): Remove (was not used).
(bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
bfd_mach_o_slurp_extended_name_table,
bfd_mach_o_construct_extended_name_table,
bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
bfd_mach_o_get_section_contents_in_window,
bfd_mach_o_bfd_is_local_label_name,
bfd_mach_o_bfd_is_target_special_symbol,
bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
bfd_mach_o_minisymbol_to_symbol,
bfd_mach_o_bfd_get_relocated_section_contents,
bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
bfd_mach_o_bfd_merge_private_bfd_data,
bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
bfd_mach_o_bfd_copy_private_header_data,
bfd_mach_o_core_file_matches_executable_p): Move these defines ...
* mach-o-target.c: ... here.
Update copyright years.
2009-06-04 Alan Modra <amodra@bigpond.net.au>
* dep-in.sed: Don't use \n in replacement part of s command.
* Makefile.am (DEP1): LC_ALL for uniq.
Run "make dep-am".
* Makefile.in: Regenerate.
2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
GOT entry for STT_GNU_IFUNC symbol with pointer equality.
(elf_i386_relocate_section): Adjust R_386_GOT32 relocation
against STT_GNU_IFUNC symbols for static executables.
(elf_i386_finish_dynamic_symbol): Load GOT entry with
PLT entry for STT_GNU_IFUNC symbol with pointer equality.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
GOT entry for STT_GNU_IFUNC symbol with pointer equality.
(elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
* coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
symbols to be left unimported when linking statically.
* xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
code when linking statically.
2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_relocs): Increment
got.refcount for R_386_GOT32/R_386_GOTOFF relocations
against STT_GNU_IFUNC symbol.
(elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
local STT_GNU_IFUNC definition is used.
(elf_i386_relocate_section): Handle got.offset != -1 for
R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
symbol.
* elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
relocations against STT_GNU_IFUNC symbol.
(elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
local STT_GNU_IFUNC definition is used.
(elf64_x86_64_relocate_section): Handle got.offset != -1
for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
STT_GNU_IFUNC symbol.
2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10205
* elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
(elf_i386_reloc_type_lookup): Likewise.
(R_386_tls): Removed.
(R_386_irelative): New.
(R_386_vt_offset): Updated.
(elf_i386_rtype_to_howto): Likewise.
(elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
(elf_i386_link_hash_table_create): Initialize igotplt,
iplt and irelplt.
(elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
(elf_i386_adjust_dynamic_symbol): Likewise.
(elf_i386_allocate_dynrelocs): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
sections.
(elf_i386_finish_dynamic_symbol): When building a static
executable, use .iplt, .igot.plt and .rel.iplt sections for
STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
locally defined STT_GNU_IFUNC symbol.
* elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
(x86_64_reloc_map): Likewise.
(R_X86_64_standard): Updated.
(elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
(elf64_x86_64_link_hash_table_create): Initialize igotplt,
iplt and irelplt.
(elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
(elf64_x86_64_adjust_dynamic_symbol): Likewise.
(elf64_x86_64_allocate_dynrelocs): Likewise.
(elf64_x86_64_relocate_section): Likewise.
(elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
sections.
(elf64_x86_64_finish_dynamic_symbol): When building a static
executable, use .iplt, .igot.plt and .rela.iplt sections for
STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
for locally defined STT_GNU_IFUNC symbol.
* reloc.c (BFD_RELOC_386_IRELATIVE): New.
(BFD_RELOC_X86_64_IRELATIVE): Likewise.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
(_bfd_elf_make_ifunc_reloc_section): Removed.
(_bfd_elf_is_ifunc_symbol): Likewise.
(_bfd_elf_create_static_ifunc_sections): New.
* elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
symbol check to ...
(elf_link_add_object_symbols): Here.
(_bfd_elf_link_hash_hide_symbol): Don't clean plt on
STT_GNU_IFUNC symbol.
(elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
(IFUNC_INFIX): Removed.
(get_ifunc_reloc_section_name): Likewise.
(_bfd_elf_make_ifunc_reloc_section): Likewise.
(_bfd_elf_is_ifunc_symbol): Likewise.
(_bfd_elf_create_static_ifunc_sections): New.
2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
(create_got_section): Likewise.
(allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
(set_tls_module_base): Likewise.
(dtpoff_base): Likewise.
(tpoff): Likewise.
(elf_i386_link_hash_table_create): Updated.
(elf_i386_create_dynamic_sections): Likewise.
(elf_i386_check_relocs): Likewise.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
(create_got_section): Likewise.
(allocate_dynrelocs): Likewise.
(readonly_dynrelocs): Likewise.
(set_tls_module_base): Likewise.
(dtpoff_base): Likewise.
(tpoff): Likewise.
(elf64_x86_64_link_hash_table_create): Updated.
(elf64_x86_64_create_dynamic_sections): Likewise.
(elf64_x86_64_check_relocs): Likewise.
(elf64_x86_64_size_dynamic_sections): Likewise.
(elf64_x86_64_relocate_section): Likewise.
2009-05-28 Nick Clifton <nickc@redhat.com>
* targets.c (_bfd_target_vector): Only include plugin target in
all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (struct call_info): New member broken_cycle.
(remove_cycle): Instead of physically removing call_info structures
to break call graph cycles, mark them using the broken_cycle flag.
(mark_overlay_section): Respect broken_cycle flag.
(unmark_overlay_section): Likewise.
(collect_lib_sections): Likewise.
(collect_overlays): Likewise.
(sum_stack): Likewise.
2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (insert_callee): Accumulate incoming callee->count.
(mark_functions_via_relocs): Initialize callee->count to 1.
(pasted_function): Likewise.
(spu_elf_auto_overlay): Honor call counts when determining number
of stubs required in software i-cache mode.
2009-05-27 Rafael Avila de Espindola <espindola@google.com>
* plugin.c (program_name): Remove.
(plugin_program_name): New.
(bfd_plugin_set_program_name): New.
(try_load_plugin): Use plugin_program_name.
* plugin.h (bfd_plugin_set_program_name): New.
2009-05-27 Rafael Avila de Espindola <espindola@google.com>
* aclocal.m4: Include ../config/plugins.m4.
* configure.in: Use AC_PLUGINS.
* configure: Regenerate.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
* elf32-ppc.c (ppc_elf_relax_section): Work with a partial
link.
* bout.c (b_out_bfd_relax_section): Reject relocatable links.
* elf32-m10300.c (mn10300_elf_relax_section): Likewise.
* elf32-avr.c (elf32_avr_relax_section): Likewise.
* elf32-frv.c (elf32_avr_relax_section): Likewise.
* elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
* elf64-mmix.c (mmix_elf_relax_section): Likewise.
* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
* reloc.c (bfd_generic_relax_section): Likewise.
* reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
* vms.c (vms_bfd_relax_section): Likewise.
2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
* elf32-i386.c (is_indirect_symbol): Renamed to ...
* elflink.c (_bfd_elf_is_ifunc_symbol): This.
* elf32-i386.c (allocate_dynrelocs): Updated.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (allocate_dynrelocs): Likewise.
(elf64_x86_64_relocate_section): Likewise.
* elf64-x86-64.c (is_indirect_symbol): Removed.
2009-05-26 Nick Clifton <nickc@redhat.com>
* po/id.po: Updated Indonesian translation.
2009-05-26 Rafael Avila de Espindola <espindola@google.com>
* Makefile.am: Run "make dep-am".
(AM_CPPFLAGS): New.
(LIBDL): New.
(ALL_MACHINES): Add cpu-plugin.lo.
(ALL_MACHINES_CFILES): Add cpu-plugin.c.
(BFD32_BACKENDS): Add plugin.lo.
(BFD32_BACKENDS_CFILES): Add plugin.c.
(libbfd_la_LIBADD): Add LIBDL
* archures.c (bfd_architecture): Add bfd_arch_plugin.
(bfd_plugin_arch): Declare.
* bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
* bfd.c (bfd): Add plugin_data.
* config.bfd: Handle the plugin target.
* configure.in: Check for --enable-plugins.
(LT_INIT): Use the dlopen option.
* cpu-plugin.c: New.
* plugin.c: New.
* plugin.h: New.
* targets.c (plugin_vec): Declare.
(_bfd_target_vector): Add plugin_vec.
* Makefile.in: Regenerate.
* bfd-in2.h: Regenerate.
* configure: Regenerate.
2009-05-26 Alan Modra <amodra@bigpond.net.au>
* dep-in.sed: Don't modify .o to .lo here. Output one filename
per line with all lines having continuation backslash. Prefix
first line with "A", following lines with "B".
* Makefile.am (DEP): Don't use dep.sed here.
(DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
dep.sed here on dependencies, sort and uniq.
* Makefile.in: Regenerate.
2009-05-25 Tristan Gingold <gingold@adacore.com>
* makefile.vms: Add verilog.obj to object list OBJS.
2009-05-24 Alan Modra <amodra@bigpond.net.au>
* bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
for BFD_IN_MEMORY is cleared.
(bfd_bwrite): Zero excess memory allocated.
2009-05-22 Julian Brown <julian@codesourcery.com>
* elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
macros.
(elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
(elf32_arm_stub_a8_veneer_blx): New stub sequences.
(elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
(elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
(a8_erratum_fix, a8_erratum_reloc): New structs.
(elf32_arm_link_hash_table): Add a8_erratum_fixes,
num_a8_erratum_fixes, fix_cortex_a8 fields.
(elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
(elf32_arm_add_stub): Split into two parts, creating...
(elf32_arm_create_or_find_stub_sec): New function.
(elf32_arm_final_link_relocate): Add forward declaration.
(arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
relocations, multiple relocations per stub.
(find_stub_size_and_template): New (using parts of arm_size_one_stub).
(arm_size_one_stub): Use find_stub_size_and_template.
(a8_reloc_compare): New.
(find_thumb_glue): Add forward declaration.
(cortex_a8_erratum_scan): New.
(elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
(bfd_elf32_arm_set_cortex_a8_fix): New.
(bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
(arm_map_one_stub): Add THUMB32_TYPE support.
(a8_branch_to_stub_data): New.
(make_branch_to_a8_stub): New.
(elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
* bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
(bfd_elf32_arm_set_target_relocs): Add argument for controlling
Cortex-A8 erratum workaround.
* bfd-in2.h: Regenerate.
2009-05-22 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* po/SRC-POTFILES.in: Regenerate.
2009-05-21 Alan Modra <amodra@bigpond.net.au>
* elflink.c (elf_link_input_bfd): Correct *pindex change in last
commit.
2009-05-21 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct elf_backend_data
<elf_backend_link_output_symbol_hook>): Return an int.
* elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
symbols on deleted .opd entries.
* elflink.c (elf_link_output_sym): Return without outputting sym
if output_symbol_hook returns 2.
(elf_link_output_extsym): Don't assign h->indx when symbol discarded.
Abort if we must not discard sym.
(elf_link_input_bfd): Similarly, don't set finfo->indices for
local syms.
(bfd_elf_final_link): Adjust elf_link_output_sym calls.
* elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
elf_backend_link_output_symbol_hook return type change.
* elf32-arm.c (output_arch_syminfo): Likewise.
(elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
(elf32_arm_output_arch_local_syms): Likewise.
* elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
* elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
(bfd_score_elf_link_output_symbol_hook): Likewise.
* elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
* elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
* elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
* elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
* elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
* elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
* elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
* elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
* elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
* elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
* elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2009-05-21 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
out of range .opd symbols.
2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
* coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
fprintf_vma directly.
* peXXigen.c (pe_print_edata): Likewise.
(pe_print_pdata): Likewise.
(_bfd_XX_print_ce_compressed_pdata): Likewise.
(_bfd_XX_print_private_bfd_data_common): Likewise.
2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
* cofflink.c (process_embedded_commands): Ignore "-aligncomm".
2009-05-15 Andrew Stubbs <ams@codesourcery.com>
Paul Brook <paul@codesourcery.com>
* elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
fix discarded sections.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (mark_overlay_section): Move .init and .fini
sections into the software icache.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (build_stub): Always build "compact" sofware
i-cache stubs.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
(spu_elf_setup): Initialize it.
(spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
Update to new-sytle cache manager data structures.
(spu_elf_build_stubs): Generate new-style cache manager data
structures and symbols.
(spu_elf_auto_overlay): Update size computation.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
segments first amongst the program headers.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
into addresses for relocation types that look at high bits. Remove
special handling of relocation overflow warnings.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
control flow graph between fragments of a function.
2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
generate only a 16-byte .toe section.
(spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2009-05-14 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
(spu_elf_place_overlay_data): ..here. New function.
* elf32-spu.h (spu_elf_place_overlay_data): Declare.
2009-05-13 Andrew Jenner <andrew@codesourcery.com>
* elf32-arm.c: Move sysdep.h to start of file.
2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
start of overlays.
(spu_elf_build_stubs): Don't define __icache_tagbase. Define
__icache_tag_array and __icache_tag_array_size.
2009-05-11 Masaki Muranaka <monaka@monami-software.com>
* elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
ATTRIBUTE_UNUSED.
(bfinfdpic_link_omit_section_dynsym): Likewise.
(elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2009-05-05 Paul Brook <paul@codesourcery.com>
* bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
* bfd-in2.h: Regenerate.
* elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
(_arm_elf_section_data): Add text and exidx fields.
(add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
copy_exidx_entry): New functions.
(elf32_arm_write_section): Fixup .ARM.exidx contents.
2009-05-05 Christophe lyon <christophe.lyon@st.com>
* elf32-arm.c (DEF_STUBS): New helper define.
(DEF_STUB): Likewise.
(stub_def): New type.
(stub_definitions): New array, containing stub template pointers
and sizes.
(arm_size_one_stub): Make use of stub_definitions.
2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
* elflink.c (find_version_for_sym): Remove from here, ...
* linker.c (bfd_find_version_for_sym): ... rename, replace
here, make public and update all callers.
* bfd-in2.h: Regenerate.
2009-04-30 Nick Clifton <nickc@redhat.com>
* elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
section pointer.
(struct elf_obj_data): Add has_ifunc_symbols boolean.
* elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
into a STT_GNU_IFUNC symbol type.
(_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
type.
(_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
the binary contains ifunc symbols.
* elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
* elf32-i386.c (is_indirect_function): New function.
(elf_i386_check_relocs): Create an ifunc output section.
(allocate_dynrelocs): Create dynamic relocs in the ifunc output
section if necessary.
(elf_i386_relocate_section): Emit a reloc against an ifunc symbol
if necessary.
(elf_i386_add_symbol_hook): New function. Set the
has_ifunc_symbols field of the elf_obj_data structure if an ifunc
symbol is encountered.
(elf_backend_post_process_headers): Define.
(elf_backend_add_symbol_hook): Define.
(elf_i386_post_process_headers): Rename to
elf_i388_fbsd_post_process_headers.
* elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
(is_indirect_function): New function.
(elf64_x86_64_check_relocs): Create an ifunc output section.
(allocate_dynrelocs): Create dynamic relocs in the ifunc output
section if necessary.
(elf64_x86_64_relocate_section): Emit a reloc against an ifunc
symbol if necessary.
(elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
elf_obj_data structure if an ifunc symbol is encountered.
(elf_backend_post_process_headers): Define.
* elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
if we have ifunc symbols to handle.
(get_ifunc_reloc_section_name): New function. Computes the name
for an ifunc section.
(_bfd_elf_make_ifunc_reloc_section): New function. Creates a
section to hold ifunc relocs.
* syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
(bfd_print_symbol_vandf): Handle ifunc symbols.
(bfd_decode_symclass): Likewise.
* bfd-in2.h: Regenerate.
2009-04-30 Joseph Myers <joseph@codesourcery.com>
* elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
MOVW and MOVT relocations in a shared library link.
2009-04-27 Anthony Green <green@moxielogic.com>
* verilog.c: New file.
* Makefile.am (BFD32_LIBS): Add verilog.c.
(BFD32_LIBS_CFILES): Add verilog.c.
(verilog.lo): New build rule.
* Makefile.in: Rebuilt.
* targets.c: Add verilog support.
* bfd.c (tdata union): Add Verilog private data field.
* bfd-in2.h: Regenerate.
2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
copy pe_opthdr.
2009-04-23 Matthias Klose <doko@ubuntu.com>
* peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
2009-04-22 Christophe Lyon <christophe.lyon@st.com>
PR9743
* elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
R_ARM_JUMP24 and R_ARM_PLT32 relocations.
(elf32_arm_size_stubs): Likewise.
(record_thumb_to_arm_glue): Deleted unused function.
(bfd_elf32_arm_process_before_allocation): No longer handle
R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
(elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
* elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
(elf32_arm_write_section): Declare early.
(elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
(arm_allocate_glue_section_space): Exclude empty sections.
(ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
(bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
BFD.
(elf32_arm_output_glue_section, elf32_arm_final_link): New.
(elf32_arm_merge_eabi_attributes): Skip the stub BFD.
(elf32_arm_size_dynamic_sections): Allocate interworking
sections here.
(bfd_elf32_bfd_final_link): Define.
2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
* coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
* coffcode.h (coff_compute_section_file_positions): Clear
D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
* libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
force_minimum_alignment.
* libcoff.h: Regenerated.
* pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
(PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
* peicode.h (pe_mkobject): Don't set force_minimum_alignment
nor target_subsystem.
* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
force_minimum_alignment nor target_subsystem.
2009-04-21 Kai Tietz <kai.tietz@onevision.com>
* coff-x86_64.c (PEI_HEADERS): Protect includes.
(bfd_pe_print_pdata): Remove #ifdef PE variation.
* pei-x86_64.c (PEI_HEADERS): Define to prevent double
include in coff-x86_64.c of headers.
(PDATA_ROW_SIZE): New define.
(pex_regs[]): New static array.
(pex64_get_runtime_function): New static function.
(pex64_get_unwind_info): Likewise.
(pex64_get_scope_entry): Likewise.
(pex64_xdata_print_uwd_codes): Likewise.
(pex64_get_section_by_rva): Likewise.
(pex64_dump_xdata): Likewise.
(pex64_bfd_print_pdata): Likewise.
(bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
* peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
* libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
Alan Modra <amodra@bigpond.net.au>
Dave Korn <dave.korn.cygwin@gmail.com>
* peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
long names and non-NUL-terminated strings.
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
* bfd-in2.h: Regenerated.
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
* peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10074
* coffcode.h (bfd_pei_p): New.
* config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
* configure.in: Remove bfd_efi_bsdrv_ia32_vec,
bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
bfd_efi_rtdrv_x86_64_vec,
bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
bfd_efi_ia64_vec with bfd_pei_ia64_vec.
* targets.c: Likewise.
* configure: Regenerated.
* libcoff.h: Likewise.
* Makefile.in: Likewise.
* efi-app-ia32.c: Removed.
* efi-app-x86_64.c: Likewise.
* efi-bsdrv-ia32.c: Likewise.
* efi-bsdrv-ia64.c: Likewise.
* efi-bsdrv-x86_64.c: Likewise.
* efi-rtdrv-ia32.c: Likewise.
* efi-rtdrv-ia64.c: Likewise.
* efi-rtdrv-x86_64.c: Likewise.
* efi-rtdrv-ia32.c: Likewise.
* efi-app-ia64.c: Moved to ...
* pei-ia64.c: This.
(TARGET_SYM): Set to bfd_pei_ia64_vec.
(TARGET_NAME): Set to pei-ia64.
* libpei.h (bfd_target_pei_p): Removed.
(bfd_target_pei_arch): Likewise.
(bfd_target_efi_app_p): Likewise.
(bfd_target_efi_app_arch): Likewise.
(bfd_target_efi_bsdrv_p): Likewise.
(bfd_target_efi_bsdrv_arch): Likewise.
(bfd_target_efi_rtdrv_p): Likewise.
(bfd_target_efi_rtdrv_arch): Likewise.
(bfd_pe_executable_p): Likewise.
* Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
(BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
and efi-rtdrv-ia32.c.
(BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
(BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
efi-rtdrv-x86_64.c. Add pei-ia64.c.
(efi-app-ia64.lo): Removed.
(efi-bsdrv-ia32.lo): Likewise.
(efi-rtdrv-ia32.lo): Likewise.
(efi-app-ia64.lo): Likewise.
(efi-bsdrv-ia64.lo): Likewise.
(efi-rtdrv-ia64.lo): Likewise.
(efi-app-x86_64.lo): Likewise.
(efi-bsdrv-x86_64.lo): Likewise.
(efi-rtdrv-x86_64.lo): Likewise.
(pei-ia64.lo): New.
* peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
with bfd_pei_p.
(arch_type): Removed.
(pe_arch): Likewise.
(pe_bfd_object_p): Just return coff_object_p.
* peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
bfd_pe_executable_p with bfd_pei_p.
2009-04-17 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
PLT entries to an undefined symbol when generating a shared
library.
2009-04-17 Nick Clifton <nickc@redhat.com>
PR 9909
* coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
* aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
* aout-target.h (MY_bfd_define_common_symbol): Likewise.
* aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
* binary.c (binary_bfd_define_common_symbol): Likewise.
* bout.c (b_out_bfd_define_common_symbol): Likewise.
* coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
* coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
* coffcode.h (coff_bfd_define_common_symbol): Likewise.
* elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
* i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
* i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
* ieee.c (ieee_bfd_define_common_symbol): Likewise.
* ihex.c (ihex_bfd_define_common_symbol): Likewise.
* libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
* mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
* mmo.c (mmo_bfd_define_common_symbol): Likewise.
* nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
* oasys.c (oasys_bfd_define_common_symbol): Likewise.
* pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
* ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
* som.c (som_bfd_define_common_symbol): Likewise.
* srec.c (srec_bfd_define_common_symbol): Likewise.
* tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
* versados.c (versados_bfd_define_common_symbol): Likewise.
* vms.c (vms_bfd_define_common_symbol): Likewise.
* xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
* xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
* coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
(pmac_xcoff_vec): Likewise.
* coff64-rs6000.c (rs6000coff64_vec): Likewise.
(aix5coff64_vec): Likewise.
* linker.c (bfd_generic_define_common_symbol): New function.
* targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
(_bfd_define_common_symbol): New field.
* libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
* xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
(xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
symbols here.
* bfd-in2.h: Regenerate.
* libbfd.h: Likewise.
* libcoff.h: Likewise.
2009-04-15 Anthony Green <green@moxielogic.com>
* targets.c: Add moxie support.
* Makefile.am: Ditto.
* Makefile.in: Rebuilt.
* cpu-moxie.c, elf32-moxie.c: New files.
* archures.c: Add moxie support.
* configure.in: Add moxie support.
* configure: Rebuilt.
* config.bfd, archures.c: Add moxie support.
* bfd-in2.h: Rebuilt.
2009-04-15 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
branch to an undef weak symbol into a jump to next instruction if
a PLT entry will be created.
2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
* coffgen.c (make_a_section_from_file): Set the backend long
section names enable if long section names found on input.
* coffcode.h: Extend long section names documentation to match.
2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (elf_link_add_object_symbols): Warn alternate ELF
machine code.
2009-04-07 DJ Delorie <dj@redhat.com>
* archures.c: Add bfd_mach_mep_c5.
* bfd-in2.h: Likewise.
* cpu-mep.c: Add bfd_c5_arch.
* elf32-mep.c: Support it.
2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_section_already_linked): Add `\n' for
info->callbacks->einfo.
* linker.c (_bfd_generic_section_already_linked): Likewise.
2009-04-06 DJ Delorie <dj@redhat.com>
* elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
* coff-x86_64.c (bfd_pe_print_pdata): Defined to
_bfd_pex64_print_pdata only if PE is defined.
* libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
(_bfd_pex64_print_pdata): This.
* peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
(_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
is defined.
2009-04-05 Kai Tietz <kai.tietz@onevision.com>
* coff-x86_64.c (bfd_pe_print_pdata): Define as
_bfd_pep_print_x64_pdata.
* libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
* peXXigen.c (_bfd_pep_print_x64_pdata): New.
2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
* elf32-xtensa.c (relax_property_section): Always set r_offset
to zero.
2009-04-02 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
branch stubs.
(elf32_arm_stub_type): New enum values for the two new stubs.
(arm_type_of_stub): Make use of the two new stubs.
(arm_size_one_stub): Handle the two new stubs.
2009-04-01 Matt Thomas <matt@netbsd.org>
* elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
hidden symbols into the GOT or PLT.GOT.
(elf_vax_relocate_section): Do not emit a PCREL reloc
into a shared object if it is against a hidden symbol.
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
and know_contains_shared_object_p.
(xcoff_archive_contains_shared_object_p): Add an "info" parameter.
Cache the result in the archive_info table.
(xcoff_auto_export_p): Add an "info" parameter and update the
call to xcoff_archive_contains_shared_object_p.
(xcoff_mark_auto_exports): Update accordingly.
(xcoff_post_gc_symbol): Likewise.
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
rather than C_EXT.
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* coff-rs6000.c (member_layout): New structure.
(archive_iterator): Likewise.
(member_layout_init): New function.
(archive_iterator_begin): Likewise.
(archive_iterator_next): Likewise.
(xcoff_write_armap_old): Use the new iterator functions.
(do_shared_object_padding): Delete.
(xcoff_write_armap_big): Use the new iterator functions. Simplify
handling of arch_info.
(xcoff_write_archive_contents_old): Allocate arelt_data in the
first loop rather than the second. Allocate a member header if
there isn't one, then work out the stat information and length
in the first loop too. Use the new iterators for the second loop.
(xcoff_write_archive_contents_big): Likewise.
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* bfd-in.h (bfd_xcoff_split_import_path): Declare.
(bfd_xcoff_set_archive_import_path): Likewise.
* bfd-in2.h: Regenerate.
* xcofflink.c: Include libiberty.h.
(xcoff_archive_info): New structure.
(xcoff_archive_info_hash): New function.
(xcoff_archive_info_eq): Likewise.
(xcoff_get_archive_info): Likewise.
(_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
(bfd_xcoff_split_import_path): New function.
(bfd_xcoff_set_archive_import_path): Likewise.
(xcoff_set_import_path): Move earlier in file.
(xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
object to the the directory part of the bfd's filename. Get the
import path and filename of an archive object from the archive's
xcoff_tdata, initializing it if necessary. Update use of
import_file_id.
(bfd_link_input_bfd): Update use of import_file_id.
(xcoff_write_global_symbol): Likewise.
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_link_create_extra_sections): Don't create
a .loader section for relocatable links.
(xcoff_need_ldrel_p): New function.
(xcoff_mark): Use it.
(bfd_xcoff_link_count_reloc): Only count loader relocs if there's
a loader section.
(xcoff_build_ldsym): New function, split out from...
(xcoff_build_ldsyms): ...here. Rename to...
(xcoff_post_gc_symbol): ...this. Only export symbols, and only
call xcoff_build_ldsym, if there's a loader section.
(xcoff_build_loader_section): New function, extracted verbatim from...
(bfd_xcoff_size_dynamic_sections): ...here. Only call it if
there's a loader section. Only add an __rtinit loader symbol
if there's a loader section. Update after above name change.
(xcoff_symbol_section, xcoff_create_ldrel): New functions.
(bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
and xcoff_create_ldrel.
(xcoff_write_global_symbol): Use xcoff_create_ldrel.
(xcoff_reloc_link_order): Likewise, but only call it if there's
a loader section. Use xcoff_symbol_section.
(_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
if there's a loader section.
2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
* xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2009-04-01 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (group_sections): Rewrite loops for better
readability.
2009-03-30 DJ Delorie <dj@redhat.com>
* elflink.c (elf_link_input_bfd): Don't try to resolve complex
relocs when doing a relocatable link.
2009-03-28 Mark Mitchell <mark@codesourcery.com>
* coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
"ERROR:", in error messages.
* cpu-arm.c (bfd_arm_merge_machines): Likewise.
* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
* elf32-arm.c (tag_cpu_arch_combine): Likewise.
(elf32_arm_merge_eabi_attributes): Likewise.
(elf32_arm_merge_private_bfd_data): Likewise.
2009-03-27 Nick Clifton <nickc@redhat.com>
* section.c (bfd_get_section_contents): Detect and handle the case
where a section has the SEC_IN_MEMORY flag set but no actual
contents allocated.
2009-03-26 Alan Modra <amodra@bigpond.net.au>
PR 6494
* elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
p_filesz and p_memsz are equal. Use p_memsz as the segment size.
(assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
if we don't find matching PT_LOAD when copying.
2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
the reloc descriptions.
2009-03-25 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
<case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
* cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
(bfd_i386_arch_intel_syntax): Likewise.
(i8086_arch): Likewise.
(bfd_x86_64_arch): Likewise.
2009-03-24 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section): <case
R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
symbols for non-allocated sections. Don't check whether to
generate R_CRIS_DTPMOD for non-allocated sections.
(cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
handle relocation GC:ing if applied to non-allocated section.
(cris_elf_check_relocs): Similar.
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
when emitting a known TP offset in the GOT.
2009-03-23 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (synthetic_opd): Delete.
(compare_symbols): Look for .opd name rather than section match.
(ppc64_elf_get_synthetic_symtab): Likewise.
2009-03-21 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (is_pic_glink_stub): Delete.
(is_nonpic_glink_stub): New function.
(ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
than first pic one.
(struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
macros for visibilty and locality checks.
(elf_s390_adjust_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(elf_s390_relocate_section): Likewise.
(elf_s390_finish_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_check_relocs): Likewise.
(elf_s390_adjust_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(elf_s390_relocate_section): Likewise.
(elf_s390_finish_dynamic_symbol): Likewise.
2009-03-19 Kai Tietz <kai.tietz@onevision.com>
* bfd-in2.h: Regenerated.
* coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
for debugging sections and map memory read/write dependent on
SEC_COFF_NOREAD.
(styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
without memory read flags set.
* section.c: Add SEC_COFF_NOREAD to section flags.
2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
* elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
for format string.
2009-03-19 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_find_overlays): Separate error return from
"no overlays" return. If there are overlays, create overlay
manager entry symbols here, so that..
(spu_elf_build_stubs): ..we don't need to set them up here.
Simplify entry symbol tests.
* elf32-spu.h (spu_elf_find_overlays): Update prototype.
2009-03-18 Mark Kettenis <kettenis@gnu.org>
* elf.c (elfcore_grok_openbsd_procinfo)
(elfcore_grok_openbsd_note): New functions.
(elf_parse_notes): Handle notes from OpenBSD ELF core files.
2009-03-18 Alan Modra <amodra@bigpond.net.au>
* vms-hdr.c: Don't include alloca.h.
* elf32-m68hc1x.c: Include alloca-conf.h.
* xsym.c: Likewise.
* elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
* som.c: Likewise.
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
* elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
2009-03-17 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
Add compact_stub.
(emum _ovly_flavour): Delete ovly_compact, ovly_none.
* elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
ovly_return fields with ovly_entry[2]. Adjust all users.
(spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
when soft-icache.
(spu_elf_build_stubs): Likewise.
(ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
ovly_flavour changes. Update all callers.
(ovl_stub_size_log2): New function.
(build_stub): Handle compact icache stubs. Use different manager
entry point for stubs in non-icache area.
(spu_elf_size_stubs): Don't allocate space for indirect branch
descriptors.
(spu_elf_build_stubs): And don't built them.
2009-03-16 Andrew Stubbs <ams@codesourcery.com>
* dwarf2.c (read_section): Always use rawsize, if available.
2009-03-16 Alan Modra <amodra@bigpond.net.au>
* simple.c (bfd_simple_get_relocated_section_contents): Use larger
of rawsize and size for buffer.
2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
parameter just because fixed sections fit into local store.
(spu_elf_auto_overlay): Do not declare as "noreturn". Skip
generating overlays if fixed sections plus reserved stack
and heap space fit into local store.
2009-03-15 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (build_stub): Correct icache set_id.
(spu_elf_relocate_section): Likewise.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_link_check_archive_element): Only free the
symbol table if it was created by the current call.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
class XMC_DS rather than XMC_UA.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
bfd_boolean export_defineds parameter with an unsigned int
auto_export_flags parameter.
* bfd-in2.h: Regenerate.
* xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
split out from xcoff_build_ldsyms.
(xcoff_covered_by_expall_p): New function.
(xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
but with extra code to handle -bexpfull and -bexpall.
(xcoff_mark_auto_exports): New function.
(xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
a function should be automatically exported.
(bfd_xcoff_size_dynamic_sections): Replace the export_defineds
parameter with an auto_export_flags parameter. Update ldinfo
accordingly. Use xcoff_mark_auto_exports to mark all automatically-
exported symbols.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_mark_symbol_by_name): New function.
(bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
init and fini functions. Do garbage collection for objects
without an entry point too.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
check whether a symbol has csect information.
(coff_print_aux): Likewise.
* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
information for C_AIX_WEAKEXT too.
(_bfd_xcoff_swap_aux_out): Likewise.
(xcoff_reloc_type_br): Handle defweak symbols too.
* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
information for C_AIX_WEAKEXT too.
(_bfd_xcoff64_swap_aux_out): Likewise.
(xcoff64_reloc_type_br): Handle defweak symbols too.
* coffgen.c (coff_print_symbol): Handle auxillary function
information for C_AIX_WEAKEXT too.
* xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
instead of BSF_GLOBAL if the L_WEAK flag is set.
(xcoff_dynamic_definition_p): New function.
(xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
defines h. Don't change h if ldsym isn't the definition. Otherwise,
always take the symbol class from the ldsym. Use weak bfd symbol
types for weak ldsyms.
(xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
Fix the check for whether a definition is from a shared object.
Allow redefinitions of weak symbols.
(xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
(xcoff_keep_symbol_p): Likewise.
(bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
(xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
but mark them as L_WEAK.
(xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_mark): When walking the relocations,
only mark the target symbol or the target section, not both.
(xcoff_final_definition_p): New function.
(xcoff_keep_symbol_p): Use it to check whether an external XCOFF
symbol is a valid definition of the associated output symbol.
Use XCOFF_ALLOCATED to stop the same hash table entry having
two output symbols.
(bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
keeping a symbol.
(xcoff_link_input_bfd): Use xcoff_final_definition_p.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
symbols as XMC_XO.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
* libcoff.h: Regenerate.
* xcofflink.c (xcoff_link_add_symbols): Record per-symbol
line-number counts in the bfd's lineno_counts field.
Don't keep per-csect line-number counts.
(xcoff_sweep): Don't update per-csect line-number counts.
(bfd_xcoff_size_dynamic_sections): Count the number of line-number
entries in each output section.
(xcoff_link_input_bfd): Get the number of line numbers from
the bfd's lineno_counts field, rather than recalculating it
from scratch. Fix the range check when updating C_BINCL and
C_EINCL symbols.
(_bfd_xcoff_bfd_final_link): Don't count the output line numbers
here. Don't expect csects to have line-number counts.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
* libcoff.h: Regenerate.
* xcofflink.c (xcoff_keep_symbol_p): New function, using the
"skip" logic from xcoff_link_input_bfd.
(bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
objects in a dynamic link, rather than checking whether csectpp
is null. Always allocate debug_index for other objects,
and always go through the loop. Update the type of debug_index
after the change above. Read the auxillary csect information
and use xcoff_keep_symbol_p to decide whether a symbol should
be kept. Set its debug_index to -2 if not.
(xcoff_link_input_bfd): Update the type of debug_index after
the change above and always expect it to be nonnull. Use it to
test whether a symbol should be stripped, rather than making the
decision here. Postpone all symbol creation to the second pass.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
creating a descriptor.
(xcoff_sweep): Don't mark toc_section unless it's needed.
(bfd_xcoff_size_dynamic_sections): Skip the toc_section
when marking every bfd.
(xcoff_link_input_bfd): Skip all TOC anchors.
(xcoff_toc_section_p, xcoff_find_tc0): New functions.
(_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
to -1; call xcoff_find_tc0 instead.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* libcoff-in.h (xcoff_section_tdata): Update commentary.
* libcoff.h: Regenerate.
* xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
the previous symbol's csect. Treat last_symndx as an inclusive value
and simplify its handling.
(xcoff_mark): Treat last_symndx as an inclusive value. Only mark
symbols with the right csect. Don't mark rsec when processing
relocations against undefined or absolute sections.
(bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
of bfd_und_section_ptr.
(xcoff_link_input_bfd): Likewise.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
flag is set. Assert that all undefined symbols are either
imported or defined by a dynamic object.
* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
* xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
handling to all relocations. Only set XCOFF_CALLED for function
symbols.
(xcoff_find_function): New function, split out from...
(bfd_xcoff_export_symbol) ...here.
(xcoff_set_import_path): New function, split out from...
(bfd_xcoff_import_symbol): ...here. Remove assertion for old
meaning of XCOFF_CALLED.
(xcoff_mark_symbol): If we mark an undefined and unimported
symbol, find some way of defining it. If the symbol is a function
descriptor, fill in its definition automatically. If the symbol
is a function, mark its descriptor and allocate room for global
linkage code. Otherwise mark the symbol as implicitly imported.
Move the code for creating function descriptors from...
(xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
check for symbols that were implicitly defined.
(xcoff_mark): Don't count any dynamic relocations against
function symbols.
(bfd_xcoff_size_dynamic_sections): Save the rtld parameter
in the xcoff link info.
(xcoff_link_input_bfd): Remove handling of undefined and
unexported symbols.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
if the target is absolute. Fix comment typo.
(xcoff_ppc_relocate_section): Remove FIXME.
* coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
if the target is absolute.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
R_POS and R_NEG relocations against absolute symbols to the
.loader section.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
to 2 for bfd_mach_ppc_620.
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* config.bfd: Treat AIX 6+ in the same way as AIX 5.
* configure.in: Likewise.
* configure: Regenerate.
2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/9945
* elf.c (assign_section_numbers): Generate symbol table if there
is any relocation in output.
(_bfd_elf_compute_section_file_positions): Likewise.
2009-03-13 Nick Clifton <nickc@redhat.com>
PR 9934
* elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
* elflink.c (elf_link_read_relocs_from_section): Use
NUM_SHDR_ENTRIES. Gracefully handle the case where there are
relocs but no symbol table.
* elf32-arm.c (elf32_arm_check_relocs): Likewise.
2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9938
* elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
to check ___tls_get_addr.
* elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
strncmp to check __tls_get_addr.
2009-03-12 Andrew Stubbs <ams@codesourcery.com>
* dwarf2.c (read_section): Always check the offset, even when the
section has been read before.
2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
comments.
2009-03-11 Chris Demetriou <cgd@google.com>
* bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
* bfd-in2.h: Regenerate.
* archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
mode.
(bsd_write_armap): Likewise.
(_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
flag is set, do nothing.
(coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
for timestamp.
2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
* elf32-spu.c (find_function_stack_adjust): Handle sf instruction
used to update stack pointer.
2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR binutils/9921
* som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
for unknown symbols in absolute section.
2009-03-06 Nick Clifton <nickc@redhat.com>
* po/es.po: Updated Spanish translation.
2009-03-05 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (group_sections): Take next section size into
account before accepting to group it.
2009-03-05 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (arm_type_of_stub): Handle long branches targetting
PLT entries.
(elf32_arm_final_link_relocate): Likewise.
2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
PR 9923
* peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
2009-03-04 Alan Modra <amodra@bigpond.net.au>
* reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
* section.c (struct bfd_section): Add has_tls_get_addr_call.
(BFD_FAKE_SECTION): Init new flag.
* ecoff.c (bfd_debug_section): Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
(ppc_elf_reloc_type_lookup): Handle new relocs.
(ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
without marker relocs.
(ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
if section has no old-style calls.
(ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
Don't try to optimize new-style __tls_get_addr call when handling
arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
relocs.
* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
(ppc64_elf_reloc_type_lookup): Handle new relocs.
(ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
without marker relocs.
(ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
if section has no old-style calls. Set toc_ref for new relocs as
appropriate.
(ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
Don't try to optimize new-style __tls_get_addr call when handling
arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
relocs.
2009-03-04 Alan Modra <amodra@bigpond.net.au>
PR 6768
* configure.in: Test for ld --as-needed support. Link shared
libbfd against libm.
* configure: Regenerate.
2009-03-03 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
* elf32-score7.c: New file.
* elf32-score.h: New file.
* elf32-score.c: Add code to support score 7. Set score7 as the
default.
* cpu-score.c: Add score7 architecure.
(compatibile): New function.
* Makefile.am: Add rules for building elf32-score7 object.
* Makefile.in: Regenerate.
* configure.in: Add elf32-score7 object to score vectors.
* configure: Regenerate.
* reloc.c: Add score7 relocs.
* archures.c: Add score3 and score7 machine numbers.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf32-hppa.c (hppa32_elf_local_refcounts): New function.
(elf32_hppa_check_relocs): Use it.
* elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
elf64-hppa.c.
(elf_hppa_unmark_useless_dynamic_symbols): Likewise.
(elf_hppa_remark_useless_dynamic_symbols): Likewise.
(elf_hppa_is_dynamic_loader_symbol): Likewise.
(elf_hppa_record_segment_addrs): Likewise.
(elf_hppa_final_link): Likewise.
(elf_hppa_relocate_insn): Likewise.
(elf_hppa_final_link_relocate): Likewise.
(elf64_hppa_relocate_section): Likewise.
* elf64-hppa.c: Insert above.
2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
(elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
(elf_hppa_relocate_section): Likewise.
* elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
from struct elf_link_hash_entry. Add count field.
(struct elf64_hppa_dyn_hash_table): Delete.
(struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
(elf64_hppa_hash_table): Rename to hppa_link_hash_table.
(hppa_elf_hash_entry, eh_name): Define.
(elf64_hppa_new_dyn_hash_entry): Delete.
(elf64_hppa_dyn_hash_lookup): Delete.
(elf64_hppa_dyn_hash_traverse): Delete.
(get_dyn_name): Delete.
(elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
of struct elf64_hppa_dyn_hash_entry *.
(elf64_hppa_finalize_dlt, llocate_global_data_dlt,
allocate_global_data_plt, allocate_global_data_stub,
allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
Likewise.
(hppa64_link_hash_newfunc): New.
(elf64_hppa_hash_table_create): Rework.
(count_dyn_reloc): Likewise.
(hppa64_elf_local_refcounts): New.
(elf64_hppa_check_relocs): Rework using standard technique for recording
local DLT, PLT and OPD reference counts.
(elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
elf_link_hash_entry *.
(elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
allocate_global_data_plt, allocate_global_data_stub,
allocate_global_data_opd, allocate_dynrel_entries,
elf64_hppa_adjust_dynamic_symbol,
elf64_hppa_mark_milli_and_exported_functions): Likewise.
(elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
Use hppa_link_hash_table. Rework.
(elf64_hppa_link_output_symbol_hook): Rework.
(elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
elf64_hppa_finish_dynamic_sections): Likewise.
2009-02-26 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (stub_reloc_type): Removed.
(insn_sequence): Renamed reloc_type field to r_type.
(elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
(elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
(elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
(elf32_arm_stub_type): Add new enum entries for the new stubs.
(arm_stub_is_thumb): Catch new stubs.
(arm_type_of_stub): Handle new stubs.
(arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
(bfd_elf32_arm_process_before_allocation): Remove useless
condition.
2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (elf_find_function): Use is_function_type to check
function symbol.
2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
* xtensa-modules.c: Revert to previous version 1.11 due
to inadvertant commit.
2009-02-24 Sterling Augustine <sterling@tensilica.com>
* elf32-xtensa.c (text_action_add): Separate test for action
type. Break if saved action is ta_widen_insn at same offset.
2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
* elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
to elf32_arm_stub_long_branch_any_arm_pic.
(elf32_arm_stub_long_branch_any_thumb_pic): New.
(enum elf32_arm_stub_type, arm_type_of_stub)
(arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
separately.
2009-02-24 Joseph Myers <joseph@codesourcery.com>
* elf32-arm.c (PREV_SEC): Update comment.
(group_sections): Rename argument to stubs_always_after_branch.
Reverse the list and place stubs at the end of input sections.
Undefine NEXT_SEC.
(elf32_arm_size_stubs): Update to use stubs_always_after_branch.
2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
* elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
Fix formatting.
(arm_size_one_stub): Remove unnecessary break.
(arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
2009-02-23 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (stub_insn_type): New type.
(stub_reloc_type): Likewise.
(insn_sequence): Likewise.
(elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
(elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
(elf32_arm_stub_long_branch_thumb_only): Likewise.
(elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
(elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
(elf32_arm_stub_long_branch_any_any_pic): Likewise.
(elf32_arm_stub_hash_entry): Add new helper fields.
(stub_hash_newfunc): Initialize these new fields.
(arm_build_one_stub): Encode Arm and Thumb instructions separately
to take endianness into account.
(arm_size_one_stub): Compute size of stubs using insn_sequence.
(arm_map_one_stub): Code is now more generic, thanks to
insn_sequence.
2009-02-23 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
code.
(elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
(arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
BLX is not available. Fix typo in warning message. Add comments
and improve formatting.
(arm_build_one_stub): Adjust to new
elf32_arm_stub_long_branch_v4t_thumb_arm stub.
(arm_map_one_stub): Likewise.
2009-02-23 Tristan Gingold <gingold@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
Douglas B Rupp <rupp@gnat.com>
* vms.h: Update copyright year, fix comments, reorder declarations.
(_bfd_save_vms_section): Remove the prototype.
(EGPS_S_V_NO_SHIFT): New constant.
(bfd_vms_set_section_flags): New prototype.
(EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
constants.
(EGSY_S_W_FLAGS): Ditto.
(EGSY_S_V_QUAD_VAL): Ditto.
(ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
(EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
EGST_S_B_NAMLNG): Ditto.
(ESRF_S_B_NAMLNG): Ditto.
(ETIR_S_C_HEADER_SIZE): Ditto.
(EGPS_S_V_ALLOC_64BIT): Ditto.
(DST_S_C_EPILOG): Ditto.
(DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
(DST_S_C_SRC_INCRLNUM_B): Ditto.
(DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
(DST_S_L_PCLINE_UNSLONG): Ditto.
(DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
(DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
(DST_S_C_SOURCE_HEADER_SIZE): Ditto.
(DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
(DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
(DST_S_B_SRC_UNSBYTE): Ditto.
(DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
Add prototypes.
(vms_section, vms_reloc): Remove types.
(hdr_struc): Replaced by ...
(hdr_struct): ... new type.
(EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
(EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
(EMH_DATE_LENGTH): Ditto.
(eom_struc): Replaced by ...
(eom_struct): ... new type.
(EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
(EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
(EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
(EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
(EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
(EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
(EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
(EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
(EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
(EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
(EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
(EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
(EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
(EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
(EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
(DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
(DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
(DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
(DBG_S_C_DMT_PSECT_SIZE): Ditto.
(enum file_type_enum): New type.
(struct location_struct): Removed.
(struct fileinfo, struct srecinfo, struct lineinfo): New types.
(struct funcinfo, struct module): Ditto.
(struct vms_private_data_struct): Update fields.
(struct vms_section_data_struct): New type.
* vms.c: Update copyright year, fix comments,
Fix includes for DECC, add prototypes.
(vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
some initializers.
Use flavour to set is_vax, location_stack is removed.
(struct pair): Declare.
(fill_section_ptr): Initialize variables at declaration.
Add guard to set SECTION_SYM flag, handlde und section.
(vms_fixup_sections): Use struct pair for fill_section_ptr argument.
(_bfd_vms_slurp_object_records): New function, replaces previous
vms_object_p.
(vms_slurp_module): New function.
(vms_slurp_image): Ditto.
(vms_object_p): Complete rewrite.
(vms_mkobject): Use is_vax field to slect architecture.
(free_reloc_stream): New function.
(vms_convert_to_var): Ditto.
(vms_convert_to_var_1): Ditto.
(vms_convert_to_var_unix_filename): Ditto.
(vms_close_and_cleanup): Call free_reloc_stream, convert file to
VAR format on VMS.
(vms_new_section_hook): Set alignment to 0, allocate private data.
(vms_get_section_contents): Load content.
(vms_get_symbol_info): Handle undefined section.
(vms_find_nearest_line): Handle.
(alloc_reloc_stream): New function.
(vms_slurp_reloc_table): Ditto.
(vms_get_reloc_upper_bound): Make it real.
(vms_canonicalize_reloc): Do the real work.
(alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
ALPHA_R_BOH.
(vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
(vms_set_arch_mach): Check arch.
(vms_set_section_contents): Copy the content after allocation.
(vms_alpha_vec): Update object flags.
* vms-tir.c: Update copyright year, fix comments,
add prototypes for new functions.
(dst_define_location): New function.
(dst_restore_location): New function.
(dst_retrieve_location): New function.
(dst_check_allocation): New function.
(image_dump): Call dst_check_allocation.
(image_write_b): Ditto.
(image_write_w): Ditto.
(image_write_l): Ditto.
(image_write_q): Ditto.
(cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
CTL_STKDL.
Call error handler instead of abort if name is not known.
(etir_sta): Add quarter_relocs argument and set it.
Fix cast.
(etir_sto): Ditto.
(etir_opr): Ditto, return FALSE in case of error.
(etir_ctl): Add quarter_relocs argument and set it, fix cast.
Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
(etir_stc): Add quarter_relocs argument and set it, fix cast.
Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
Return FALSE in case of error.
(tir_sta): Change sign of psect.
(tir_ctl): Ditto.
(tir_cmd): Fix cast. Makes tir_table static const.
(etir_cmd): Add quarter_relocs argument, makes etir_table const,
add argument to explain.
(analyze_etir): Initialize maxptr, add quarter_relocs
declaration, move some declarations into inner scopes.
Handle quarter_relocs and STO_IMM.
(_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
(_bfd_vms_slurp_relocs): New function.
(_bfd_vms_decode_relocs): New function.
(sto_imm): Rewritten.
(start_first_etbt_record): New function.
(start_another_etbt_record): Ditto.
(etir_output_check): Ditto.
(defer_reloc_p): Ditto.
(_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
a for-loop. Correctly deals with contents, deals with .vmsdebug,
rewritte relocations handling.
(_bfd_vms_write_tbt): Removed.
(_bfd_vms_write_dbg): Ditto.
* vms-misc.c: Update copyright year, Fix comments.
(_bfd_vms_get_header_values): Use 'size' instead of 'length'.
(maybe_adjust_record_pointer_for_object): New function.
(_bfd_vms_get_first_record): New function, replaces ...
(_bfd_vms_get_record): .. removed.
(_bfd_vms_get_object_record): New function.
(_bfd_vms_get_object_record): New function.
(vms_get_remaining_object_record): New function, replaces ...
(_bfd_vms_get_next_record): ... removed.
(add_new_contents): Removed.
(_bfd_save_vms_section): Removed.
(_bfd_get_vms_section): Removed.
(_bfd_vms_output_flush): Write in VAR format.
(new_symbol): Don't make UND section.
* vms-hdr.c: Update copyright year, update list of record handled.
(_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
(_bfd_vms_write_hdr): Strip vms and unix patches,
add comments, truncate module name at 31 characters,
use constants instead of hard-coded value,
write BFD version instead of a fixed string.
(_bfd_vms_slurp_ihd): New function.
(_bfd_vms_slurp_isd): Ditto.
(_bfd_vms_slurp_ihs): Ditto.
(new_module): Ditto.
(parse_module): Ditto
(build_module_list): Ditto.
(module_find_nearest_line): Ditto.
(_bfd_vms_find_nearest_dst_line): Ditto.
(vms_slurp_debug): Ditto.
(_bfd_vms_slurp_dbg): Ditto.
(_bfd_vms_slurp_tbt): Ditto.
(_bfd_vms_write_dbg): Ditto.
(_bfd_vms_write_tbt): Ditto.
* vms-gsd.c: Update copyright year, update list of records handled.
(EVAX_LITERALS_NAME): New macro.
(evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
(gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
(register_universal_symbol): New function and prototype.
(_bfd_vms_slurp_gsd): Fix indentations and casts,
improve debug messages,
use constants instead of hard-coded value,
fix missing endianness conversion,
handle global symbol (SYMG).
(bfd_vms_set_section_flags): New function.
(_bfd_vms_write_gsd): Don't write .vmsdebug section,
handle section literals,
fix indentation,
handle section bfd and vms flags,
don't output LIB$INITIALIZE symbol,
fix handling of weak symbols,
fix evax vs vax procedure descriptor,
handle absolute symbols.
* reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
* makefile.vms (DEFS): Fix flags for VMS.
* bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
* bfd-in2.h: Regenerated.
* libbfd.h: Regenerated.
2009-02-20 Cary Coutant <ccoutant@google.com>
* vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
in struct stat.
2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
PR gas/7059
* coffcode.h (coff_write_object_contents): Don't let the string
table offset overflow the s_name field when using long section names.
2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
* coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
* coff-mips.c (mips_ecoff_backend_data): Likewise.
* coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
(bfd_pmac_xcoff_backend_data): Likewise.
* coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
(bfd_xcoff_aix5_backend_data): Likewise.
(xcoff64_write_object_contents): Delete unused long_section_names
local variable.
* coff-sh.c (bfd_coff_small_swap_table): Initialise long section
name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
struct non-const.
* coffcode.h (documentation): Update to describe long section names.
(COFFLONGSECTIONCATHELPER): New helper macro.
(BLANKOR1TOODD): Likewise.
(COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
(COFF_LONG_SECTION_NAMES_SETTER): Likewise.
(COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
(bfd_coff_set_long_section_names_allowed): New function.
(bfd_coff_set_long_section_names_disallowed): Likewise.
(struct bfd_coff_backend_data): Add new backend hook function
pointer _bfd_coff_set_long_section_names.
(bfd_coff_set_long_section_names): New backend hook.
(coff_write_object_contents): Only generate long section names if
bfd_coff_long_section_names() indicates they are currently enabled.
(bfd_coff_std_swap_table): Make non-const, and initialise long
section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
(ticoff0_swap_table): Likewise to both.
(ticoff1_swap_table): Again, likewise to both.
* coffgen.c (make_a_section_from_file): Allow long section names
as inputs even if not currently allowed for outputs.
* ecoff.c (_bfd_ecoff_no_long_sections): New function.
* efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
* efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
* efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
* pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
* libcoff-in.h: Update copyright year to cause updated copyright
year in generated libcoff.h, and fix typo.
* libcoff.h: Regenerated.
* libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
(_bfd_ecoff_no_long_sections): Add prototype.
* libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
* pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
defined by an including .c file.
* ticoff.h (ticoff0_swap_table): Make non-const, and initialise
long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
(ticoff1_swap_table): Likewise to both.
2009-02-18 Christophe Lyon <christophe.lyon@st.com>
* elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
stub. Catch default case error.
(arm_map_one_stub): Add missing Thumb mapping symbol.
2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
PR 9841
* elf32-avr.c: Handle case where no local symbos exist correctly.
2009-02-16 Christophe Lyon <christophe.lyon@st.com>
bfd/
* elf32-arm.c (arm_long_branch_stub,
arm_thumb_v4t_long_branch_stub,
arm_thumb_thumb_long_branch_stub,
arm_thumb_arm_v4t_long_branch_stub,
arm_thumb_arm_v4t_short_branch_stub,
arm_pic_long_branch_stub):
Renamed to elf32_arm_stub_long_branch_any_any,
elf32_arm_stub_long_branch_v4t_arm_thumb,
elf32_arm_stub_long_branch_thumb_only,
elf32_arm_stub_long_branch_v4t_thumb_arm,
elf32_arm_stub_short_branch_v4t_thumb_arm,
elf32_arm_stub_long_branch_any_any_pic.
(arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
arm_thumb_thumb_stub_long_branch,
arm_thumb_arm_v4t_stub_long_branch,
arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
Renamed to arm_stub_long_branch_any_any,
arm_stub_long_branch_v4t_arm_thumb,
arm_stub_long_branch_thumb_only,
arm_stub_long_branch_v4t_thumb_arm,
arm_stub_short_branch_v4t_thumb_arm,
arm_stub_long_branch_any_any_pic.
2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
in branch offset check.
2009-02-15 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
add toc.symndx and toc.add.
(ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
Set up toc.add.
(get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
callers.
(ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
(branch_reloc_hash_match): New function, extracted from..
(ppc64_elf_tls_optimize): ..here.
(ppc64_elf_relocate_section): Properly set addends when optimizing
tls sequences. Avoid unnecessary reading and writing of insns.
Only redo reloc when symbol changed. Bypass symbol checks when
using tlsld_got.
* elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
(branch_reloc_hash_match): New function, extracted from..
(ppc_elf_tls_optimize): ..here.
(ppc_elf_relocate_section): Avoid unnecessary reading of insns.
Don't clear addend on zapped __tls_get_addr reloc.
2009-02-12 Nick Clifton <nickc@redhat.com>
PR 9827
* elflink.c (bfd_elf_final_link): When counting the relocations,
if the header size has not been set yet then assume that it will
match the output section's reloc type.
2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
* elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
relocatable link.
2009-02-09 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
(find_function): Likewise.
(pasted_function): Don't error if no prior function found.
(discover_functions): Revert 2008-12-10 change. Extend first
function range to start of section.
2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
functions to C90.
* elf64-hppa.h: Likewise.
2009-02-06 Joseph Myers <joseph@codesourcery.com>
* elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
.sbss handling.
2009-02-04 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
2009-02-03 Sandip Matte <sandip@rmicorp.com>
* aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
* archures.c (bfd_mach_mips_xlr): Define.
* bfd-in2.h: Regenerate.
* cpu-mips.c (I_xlr): Define.
(arch_info_struct): Add XLR entry.
* elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
(mips_set_isa_flags): Handle bfd_mach_mips_xlr
(mips_mach_extensions): Add XLR entry.
2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
* elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
* configure.in: AC_SUBST pdfdir.
* Makefile.am: Add install-pdf, install-pdf-am
and install-pdf-recursive targets. Define pdfdir.
* doc/Makefile.am: Define pdf__strip_dir. Add
install-pdf and install-pdf-am targets.
* po/Make-in: Add install-pdf target.
* configure: Regenerate.
* Makefile.in: Regenerate
* doc/Makefile.in: Regenerate.
2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
* bfd-in2.h: Regenerate.
* elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
fields from n_entries to n_slots where appropriate, update comments.
(HOWTO): Add TLS relocations.
(reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
(enum elf_m68k_got_offset_size): New enum.
(struct elf_m68k_got_entry.type): Move field to ...
(struct elf_m68k_got_entry_key): ... here. Update all uses.
(elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
functions.
(elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
functions.
(struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
fields into n_entries array. Update comments.
(elf_m68k_init_got): Simplify, update all uses.
(elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
(ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
GOT entries; update name, update all uses.
(ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
(elf_m68k_get_got_entry): Update.
(elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
simplify.
(elf_m68k_remove_got_entry_type): Simplify.
(elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
(elf_m68k_can_merge_gots): Update.
(elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
(struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
GOT entries, simplify.
(elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
(struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
field, remove obsoleted local_n_entries field.
(elf_m68k_partition_multi_got_2): New static function.
(elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
update.
(elf_m68k_remove_got_entry_type): Update.
(elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
(elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
update of sgot->size and srelgot->size.
(elf_m68k_gc_sweep_hook): Update.
(elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
(elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
TLS relocations.
* reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
* libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2009-02-02 DJ Delorie <dj@redhat.com>
* elf32-mep.c (config_names): Regenerate configuration.
2009-02-02 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (bfd_elf_get_str_section): Don't declare.
(bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
* elf.c (bfd_elf_get_str_section): Make static.
(bfd_elf_find_section): Delete.
* libbfd.h: Regenerate.
2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
(_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
2009-01-31 Alan Modra <amodra@bigpond.net.au>
* elflink.c (on_needed_list): New function.
(elf_link_add_object_symbols): Link in --as-needed libs if they
satisfy undefined symbols in other libs.
2009-01-30 Julian Brown <julian@codesourcery.com>
* elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
EXEC_P or DYNAMIC flags, and skip sections which are being linked
with --just-symbols (-R).
2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
* dwarf2.c (read_rangelist): Use read_address to read low_pc and
high_pc in order to properly sign-extend VMAs.
2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
Catherine Moore <clm@codesourcery.com>
* elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2009-01-28 Catherine Moore <clm@codesourcery.com>
* elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
SEC_LOAD for dynamic relocation sections.
2009-01-27 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
(info)->tls_size, not elf_hash_table (info)->tls_sec->size for
the size of local TLS data.
2009-01-27 Andreas Schwab <schwab@suse.de>
* mach-o.c (bfd_mach_o_archive_p): Restrict the number of
architectures in the archive.
2009-01-27 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
<R_CRIS_32_DTPREL>: Correct relocation value.
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
<R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
symbols with non-default visibility.
2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
* elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
describing the trampolines.
(ppc_elf_relocate_section): Update relocs to describe the
trampolines.
2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
and R_PARISC_PCREL12F relocations.
2009-01-24 Alan Modra <amodra@bigpond.net.au>
PR 6022
* elflink.c (find_version_for_sym): New function split out from,
but without export_dynamic test, ..
(_bfd_elf_link_assign_sym_version): ..here.
(_bfd_elf_export_symbol): Use it.
2009-01-23 Alan Modra <amodra@bigpond.net.au>
* elf-bfd.h (struct elf_assign_sym_version_info): Delete.
(struct elf_info_failed, struct elf_find_verdep_info): Move to..
* elflink.c: ..here, somewhat modified.
* elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
_bfd_elf_link_find_version_dependencies,
_bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
_bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
_bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
declare..
* elflink.c: ..and make static here.
(_bfd_elf_link_find_version_dependencies): Adjust for removal
of output_bfd from struct elf_find_verdep_info.
(_bfd_elf_link_assign_sym_version): Similarly adjust to use
struct elf_info_failed.
(bfd_elf_size_dynamic_sections): Adjust.
2009-01-22 Alan Modra <amodra@bigpond.net.au>
PR 6832
* dwarf2.c (find_line): Don't update stash->sec_info_ptr until
after comp_unit_find_line call.
2009-01-21 Nick Clifton <nickc@redhat.com>
PR 9769
* vmsutil.c (vms_file_stats_name): Remove use of unsupported
tm_gmtoff field in struct tm.
2009-01-21 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.h (struct spu_elf_params): Add non_ia_text.
* elf32-spu.c (mark_overlay_section): Only include .text.ia.*
sections in soft-icache lines unless non_ia_text. Don't add
rodata if doing so would exceed line size.
2009-01-19 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
types than bfd_link_hash_indirect, before early return, call
_bfd_elf_link_hash_copy_indirect.
2009-01-19 Andrew Stubbs <ams@codesourcery.com>
* elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
* elf-bfd.h (elf_backend_data): Add obj_attrs_order.
* elf32-arm.c (elf32_arm_obj_attrs_order): New function.
(elf_backend_obj_attrs_order): New define.
* elfxx-target.h (elf_backend_obj_attrs_order): New define.
(elfNN_bed): Add elf_backend_obj_attrs_order.
2009-01-19 Andrew Stubbs <ams@codesourcery.com>
* elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
(obj_attr_size): Likewise.
(write_obj_attribute): Likewise.
(_bfd_elf_copy_obj_attributes): Likewise.
(_bfd_elf_parse_attributes): Likewise.
* elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
(ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
(ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
(ATTR_TYPE_HAS_NO_DEFAULT): New define.
* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
with macros.
2009-01-19 Andrew Stubbs <ams@codesourcery.com>
* elf-attrs.c (is_default_attr): Support defaultless attributes.
(bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
(bfd_elf_add_obj_attr_string): Likewise.
(bfd_elf_add_obj_attr_int_string): Likewise.
(_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
* elf-bfd.h (struct obj_attribute): Document new flag bit.
* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
Tag_nodefaults has no default value.
(elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
comment to reflect the new state.
2009-01-19 Alan Modra <amodra@bigpond.net.au>
PR 9695
* pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
(some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
(adjust_z_magix): Delete dead code handling QMAGIC.
2009-01-16 Kai Tietz <kai.tietz@onevision.com>
* coffcode.h (styp_to_sec_flags): Correct interpretation of
IMAGE_SCN_MEM_DISCARDABLE.
2009-01-16 Alan Modra <amodra@bigpond.net.au>
* Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
* configure.in (commonbfdlib): Delete.
(SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
(SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
is available, not just for linux.
* po/SRC-POTFILES.in: Regenerate.
* Makefile.in: Regenerate.
* configure: Regenerate.
2009-01-15 Andrew Stubbs <ams@codesourcery.com>
Julian Brown <julian@codesourcery.com>
* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
ARM attributes in ABI 2.07.
* elf32-arm.c (get_secondary_compatible_arch): New function.
(set_secondary_compatible_arch): New function.
(tag_cpu_arch_combine): New function.
(elf32_arm_copy_one_eabi_other_attribute): Delete function.
(elf32_arm_copy_eabi_other_attribute_list): Delete function.
(elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
make it fit with order_01243.
Add support for Tag_also_compatible_with,
Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
Tag_VFP_arch and Tag_ABI_FP_16bit_format.
Rework the way unknown attributes are handled.
Defer errors until all attributes have been processed.
2009-01-15 Andrew Stubbs <ams@codesourcery.com>
* elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
bfd_elf_add_obj_attr_int_string.
Read Tag_compatibility from its new location in the attribute array,
rather than the attribute list.
(_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
bfd_elf_add_obj_attr_int_string.
(_bfd_elf_parse_attributes): Likewise.
(_bfd_elf_merge_object_attributes): There's now only one
Tag_compatibility, and it's in the array, not the list.
* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
Tag_compatibility.
(bfd_elf_add_obj_attr_compat): Rename to
bfd_elf_add_obj_attr_int_string.
(bfd_elf_add_proc_attr_compat): Rename to
bfd_elf_add_proc_attr_int_string.
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
Tag_compatibility.
2009-01-15 Douglas B Rupp <rupp@gnat.com>
* Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
(BFD32_BACKENDS_CFILES): Add new file vmsutil.c
(vmsutil.lo): Add dependency rule.
* Makefile.in: Regenerate.
* config.bfd (ia64*-*-*vms*): Add case.
* configure.in (bfd_elf64_ia64_vms_vec): Add case.
* configure: Regenerate.
* vmsutil.c: New file.
* vmsutil.h: New file.
* elf-bfd.h (struct bfd_elf_special_section): Change type of
attr to bfd_vma.
* elfxx-ia64.c (elfNN_vms_post_process_headers,
elfNN_vms_section_processing, elfNN_vms_final_write_processing,
elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
elfNN_vms_object_p): New functions
* targets.c (bfd_elf64_ia64_vms_vec): New target.
2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9727
* elflink.c (elf_gc_sweep): Exclude the group section if the
first member of the section group is excluded.
2009-01-14 Alan Modra <amodra@bigpond.net.au>
PR 9735
* syms.c (_bfd_stab_section_find_nearest_line): Don't free
saved filename, use bfd_alloc rather than bfd_malloc for it.
2009-01-13 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
2009-01-13 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (remove_cycles): Always set call->max_depth.
2009-01-12 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
2009-01-12 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
num_lines_log2.
(struct got_entry): Add br_addr.
(struct call_info): Add priority.
(struct function_info): Add lr_store and sp_adjust.
(spu_elf_setup): Init line_size_log2 and num_lines_log2.
(spu_elf_find_overlays): For soft-icache, mark any section within cache
area as an overlay, and check that no other overlays exist. Look up
icache overlay manager entry sym.
(BRA_STUBS, BRA, BRASL): Define.
(enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
(needs_ovl_stub): Adjust for soft-icache. Return priority encoded
in branch insn.
(count_stub, build_stub): Support soft-icache.
(build_spuear_stubs, process_stubs): Adjust build_stub call.
(spu_elf_size_stubs): Size soft-icache stubs.
(overlay_index): New function.
(spu_elf_build_stubs): Make static. Support soft-icache.
(spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
(find_function_stack_adjust): Save lr store and stack adjust insn
offsets.
(maybe_insert_function): Adjust find_function_stack_adjust call.
(mark_functions_via_relocs): Retrieve priority.
(remove_cycles): Only warn about pruned arcs when stack_analysis.
(sort_calls): Sort by priority first.
(mark_overlay_section): Ignore .ovl.init.
(sum_stack): Only print when stack_analysis.
(print_one_overlay_section): New function, extracted from..
(spu_elf_auto_overlay): ..here. Support soft-icache overlays.
(spu_elf_stack_analysis): Only print when htab->stack_analysis.
(spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
analysis. Call spu_elf_build_stubs.
(spu_elf_relocate_section): For soft-icache encode overlay index
into addresses.
(spu_elf_output_symbol_hook): Support soft-icache.
(spu_elf_modify_program_headers: Likewise.
* elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
num_regions to num_lines. Add line_size and max_branch.
(enum _ovly_flavour): Add ovly_soft_icache.
(spu_elf_build_stubs): Delete.
2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
2009-01-07 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
<case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
the program, the known offset starts at the negative size of the
TLS section.
<case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
Similar.
2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* config.bfd: Add lm32-*-rtems*.
2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
* coff-ppc.c: Add 2009 to Copyright.
* elf32-cris.c: Likewise.
* elflink.c: Likewise.
2009-01-03 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9679
* elflink.c (elf_merge_st_other): New.
(_bfd_elf_merge_symbol): Use it on skipped weak definitions and
hide them if needed.
(elf_link_add_object_symbols): Updated.
2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9676
* elflink.c (elf_link_add_object_symbols): Update def_dynamic,
ref_dynamic and dynamic_def fields when setting def_regular
to 1.
2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
PR 9682
* coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
literal.
For older changes see ChangeLog-2008
Local Variables:
mode: change-log
left-margin: 8
fill-column: 74
version-control: never
End:
|