summaryrefslogtreecommitdiff
path: root/src/ChangeLog
blob: 9ce621fa804cb65deb061abc64ff1e504a88acd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
2011-02-11  Roland McGrath  <roland@redhat.com>

	* elfcmp.c (ignore_build_id): New variable.
	(options, parse_opt): Grok --ignore-build-id to set it.
	(main): For SHT_NOTE sections, compare note details rather than raw
	bytes.  Under --ignore-build-id, don't complain about differing build
	ID contents if lengths match.

2011-02-08  Roland McGrath  <roland@redhat.com>

	* ldscript.y (filename_id_star): Remove unused variable.

	* unstrip.c (copy_elided_sections): Remove unused variable.

	* elflint.c (check_dynamic): Remove unused variables.

	* elflint.c (check_symtab): Warn about missing xndx section only once.

	* ldgeneric.c (check_for_duplicate2): Remove unused variable.

2011-01-06  Roland McGrath  <roland@redhat.com>

	* strip.c (handle_elf): Under --strip-sections, remove all
	non-allocated sections and never generate .gnu_debuglink.

2011-01-04  Roland McGrath  <roland@redhat.com>

	* strip.c (remove_shdrs): New variable.
	(options, parse_opt): Grok --strip-sections to set it.
	(handle_elf): When that's set, truncate off .shstrtab and shdrs.

2010-11-10  Roland McGrath  <roland@redhat.com>

	* findtextrel.c (process_file): Don't assume order of sections.
	Reported by Mike Hommey <mh@glandium.org>.

2010-07-26  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ops): Handle DW_OP_GNU_implicit_pointer.

2010-08-30  Roland McGrath  <roland@redhat.com>

	Print .debug_loc/.debug_ranges with cognizance of actual DIE uses.
	* readelf.c (parse_opt): Add section_info to implicit_debug_sections
	for ranges, loc.
	(struct listptr, struct listptr_table): New types.
	(compare_listptr, reset_listptr, sort_listptr): New functions.
	(notice_listptr, skip_listptr_hole): New functions.
	(struct attrcb_args): Add silent member.
	(attr_callback): Call notice_listptr for loclistptr and rangelistptr.
	Suppress output if silent, but still call notice_listptr.
	(print_debug_units): Suppress output if section_info not requested.
	(print_debug_loc_section): Call sort_listptr, skip_listptr_hole.
	(print_debug_ranges_section): Likewise.
	(print_debug): Call reset_listptr on both tables.

	* readelf.c (print_debug_ranges_section): Print empty list.
	(print_debug_loc_section): Likewise.

	* readelf.c (print_debug_loc_section): Check for bogus length
	before calling print_ops.
	(print_ops): Check harder for bogus data that would read off end.

2010-08-11  Roland McGrath  <roland@redhat.com>

	* readelf.c (for_each_section_argument): Process all sections with
	matching name, not just the first.

2010-07-26  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ops): Take new argument for CU version.
	Fix DW_OP_call_ref decoding to depend on it.
	(print_debug_loc_section): Update caller.
	(print_cfa_program): Take new argument, pass it down.
	(print_debug_frame_section): Update caller.
	(struct attrcb_args): New member version.
	(print_debug_units): Initialize it.

2010-07-02  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_frame_section): Use format_dwarf_addr for
	initial_location.

2010-06-30  Roland McGrath  <roland@redhat.com>

	* strings.c (main): Use STDIN_FILENO, not STDOUT_FILENO.
	Ignore st_size for a non-S_ISREG file descriptor.
	(read_block): Move assert after no-mmap bail-out.
	(read_block_no_mmap): Fix size calculations for moving buffer remnant.

2010-06-22  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_line_section): Fix braino in DW_LNS_set_isa.

2010-06-21  Roland McGrath  <roland@redhat.com>

	* readelf.c (dwarf_tag_string): Handle new v4 tags.
	(dwarf_attr_string): Add new attributes.
	(dwarf_tag_string): Handle DW_TAG_GNU_*.

	* readelf.c (print_ops): Use 64-bit types for LEB128 operands.
	(print_cfa_program): Likewise.

2010-06-20  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_units): New function, broken out of ...
	(print_debug_info_section): ... here.  Call it.
	(print_debug_types_section): New function.
	(enum section_e): Add section_types alias for section_info.
	(print_debug): Add types to the sections table.

	* readelf.c (print_debug_frame_section): Handle version 4 format.

	* readelf.c (print_debug_line_section): Handle version 4 format.

2010-06-14  Roland McGrath  <roland@redhat.com>

	* unstrip.c (copy_elided_sections): Make sure all sections' data have
	been read in before we write anything out.

2010-06-04  Roland McGrath  <roland@redhat.com>

	* unstrip.c (update_shdr): New function.
	(update_sh_size): Call it instead of gelf_update_shdr.
	(adjust_relocs, add_new_section_symbols): Likewise.
	(new_shstrtab, copy_elided_sections): Likewise.

	* unstrip.c (copy_elided_sections): Bail if stripped file has more
	sections than unstripped file, rather than getting confused later.

2010-06-01  Roland McGrath  <roland@redhat.com>

	* readelf.c (dwarf_form_string): Handle DWARF 4 forms.
	(attr_callback): Handle DW_FORM_flag_present, DW_FORM_exprloc,
	DW_FORM_sec_offset, DW_FORM_ref_sig8.

	* readelf.c (print_debug): Don't bail if libdw setup fails.
	Suppress complaint if we only want .eh_frame anyway.

2010-05-28  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (attr_callback): Also print form information.

2010-05-19  Roland McGrath  <roland@redhat.com>

	* addr2line.c (find_symbol): Short-circuit on empty name.
	(handle_address): Handle SYMBOL with no +OFFSET.

2010-05-08  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ops): Take new arg OFFSET_SIZE.
	Use that for DW_OP_call_ref, not ADDRSIZE.
	(print_cfa_program): Update caller.
	(struct attrcb_args): Add offset_size field.
	(attr_callback): Use it for print_ops call.
	(print_debug_info_section): Initialize it.
	(print_ops): Likewise.

2010-04-14  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_core_item): Fix bitmask printing.

2010-04-06  Roland McGrath  <roland@redhat.com>

	* ld.c (options): Fix some typos in messages.
	* elflint.c (check_scn_group, check_group): Likewise.
	* ldscript.y (add_id_list): Likewise.
	* readelf.c (print_hash_info): Add xgettext:no-c-format magic comment
	before translated string containing a literal %.

2010-02-26  Roland McGrath  <roland@redhat.com>

	* readelf.c (process_file): Don't leak an fd in failure case.

2010-02-15  Roland McGrath  <roland@redhat.com>

	* Makefile.am: Use config/eu.am for common stuff.

	* readelf.c (print_debug_frame_section): Add a cast to avoid sign
	mismatch in comparison.

2010-02-02  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_encoding_base): Handle DW_EH_PE_absptr (zero).
	(read_encoded): Likewise.
	(print_debug_frame_section): Check for bogus augmentation length.
	For P augmentation, use read_encoded, print the encoding description,
	and use hex for unsigned values.

2010-01-15  Roland McGrath  <roland@redhat.com>

	* ar.c: Include <sys/stat.h>.
	* elflint.c: Likewise.
	* readelf.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise

2010-01-07  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ehdr): Handle PN_XNUM.
	(phnum): New static variable.
	(process_elf_file): Set it with elf_getphdrnum.
	(print_phdr): Use phnum instead of EHDR->e_phnum.
	(print_dynamic, handle_notes): Likewise.
	(handle_relocs_rel, handle_relocs_rela): Likewise.

	* elfcmp.c (main): Use elf_getshdrnum and elf_getphdrnum.

	* elflint.c (phnum): New static variable.
	(check_elf_header): Set it, handling PN_XNUM.
	Use that in place of EHDR->e_phnum throughout.
	(check_symtab, check_reloc_shdr, check_dynamic): Likewise.
	(unknown_dependency_p, check_sections, check_program_header): Likewise.

2010-01-05  Roland McGrath  <roland@redhat.com>

	* readelf.c (dwarf_attr_string): Match DW_AT_GNU_vector and
	DW_AT_GNU_template_name.

2010-01-04  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_notes_data): Grab NT_AUXV only for name "CORE".
	(handle_core_note): Pass NHDR and NAME to ebl_core_note.
	(handle_core_item): Handle .format of '\n' as \n-separated strings.

	* readelf.c (implicit_debug_sections): New variable.
	(parse_opt): Set it instead of print_debug_sections for -a.
	OR them together for print_debug check.
	(print_debug): OR them together for section check.

	* readelf.c (options): Repartition into set implied by -a and others.
	Correct -a text to match reality.

	* readelf.c (struct section_argument): Add bool member 'implicit'.
	(parse_opt): Set it for -a cases, clear it for -x args.
	(for_each_section_argument): Don't complain about a missing section by
	name if it's implicit.

2009-11-16  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_string_section): Punt SHT_NOBITS like empty
	sections, just as dump_data_section already does.

2009-09-21  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (special_sections): Allow MERGE and STRINGS flags to be
	set for .comment section.
	Patch by Mark Wielaard <mjw@redhat.com>.

2009-09-08  Roland McGrath  <roland@redhat.com>

	* ar.c (main): Fix typo in message format.

2009-08-21  Roland McGrath  <roland@redhat.com>

	* readelf.c (attr_callback): Use print_block only when we don't use
	print_ops.

2009-08-14  Roland McGrath  <roland@redhat.com>

	* ar.c (do_oper_extract): Use pathconf instead of statfs.

2009-08-01  Ulrich Drepper  <drepper@redhat.com>

	* debugpred.h: Add two most const.

2009-07-26  Mark Wielaard  <mjw@redhat.com>

	* elflint.c (check_note_data): Recognize NT_GNU_GOLD_VERSION.

2009-07-25  Mark Wielaard  <mjw@redhat.com>

	* Makefile.am (addr2line_LDADD): Add $(libelf).

2009-07-24  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_block): New function.
	(print_ops): Use it.
	(attr_callback): Use it for DW_FORM_block* forms.

2009-07-20  Mark Wielaard  <mjw@redhat.com>

	* readelf.c (print_ops): Add handling of DW_OP_implicit_value
	and DW_OP_stack_value.

2009-07-14  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_elf_header): Allow Linux ABI.
	(check_symtab): Handle STB_GNU_UNIQUE.

2009-07-08  Mark Wielaard  <mjw@redhat.com>

	* readelf.c (attr_callback): Handle DW_Form constants for
	DW_AT_data_member_location.

2009-07-06  Roland McGrath  <roland@redhat.com>

	* readelf.c (register_info): New function.  Handle unknown register #s.
	(print_cfa_program): Use it.
	(handle_core_register, handle_core_registers): Likewise.

2009-06-28  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_address_names): New static variable.
	(options, parse_opt): Grok -N/--numeric-addresses to clear it.
	(format_dwarf_addr): Don't look up name if !print_address_names.

2009-06-13  Ulrich Drepper  <drepper@redhat.com>

	* ldgeneric.c: Don't use deprecated libelf functions.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise.
	* ld.h: Fix up comment.

2009-06-01  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_relocs): Expect ELF header argument and pass on
	to handle_relocs_rel* functions. Adjust caller.
	(handle_relocs_rel): Add ELF header argument.  Add special case for
	the IRELATIVE relocations in statically linked executables.
	(handle_relocs_rela): Likewise.

2009-04-29  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_symtab): Add tests of st_other field.

2009-04-23  Ulrich Drepper  <drepper@redhat.com>

	* Makefile [BUILD_STATIC] (libdw): Add $(zip_LIBS).

2009-04-20  Roland McGrath  <roland@redhat.com>

	* addr2line.c (print_dwarf_function): Honor -s and -A for file names
	of inline call sites.

	* addr2line.c (just_section): New variable.
	(adjust_to_section): New function, broken out of ...
	(handle_address): ... here.
	(options, parse_opt): Add -j/--section=NAME to set it.

2009-04-15  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_frame_section): Check for DW_CIE_ID_64 in
	64-bit format header, DW_CIE_ID_32 in 32-bit format header.

2009-04-14  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_attributes): Treat SHT_ARM_ATTRIBUTES on EM_ARM
	like SHT_GNU_ATTRIBUTES.

	* readelf.c (handle_core_registers): Fix error message.

	* strip.c (handle_elf: check_preserved): Don't note any change when
	.debug_data is already filled from a previous pass.

2009-02-05  Ulrich Drepper  <drepper@redhat.com>

	* objdump.c (show_relocs_x): Minor cleanups.

	* readelf.c (print_cfa_program): Correct a few labels.
	Print first DW_CFA_expression and DW_CFA_val_expression parameter
	as register.

2009-02-01  Ulrich Drepper  <drepper@redhat.com>

	* objdump.c (show_relocs_rel, show_relocs_rela): Split common parts
	into ...
	(show_relocs_x): ...here.  New function.
	(show_relocs): Better spacing in output.

	* objdump.c (show_relocs_rela): Show offsets as signed values.

	* ar.c (main): Fix recognition of invalid modes for a, b, i modifiers.
	Improve some error messages.
	Use program_invocation_short_name instead of AR macro.
	* Makefile.am (CFLAGS_ar): Remove.
	* elflint.c (parse_opt): ARGP_HELP_EXIT_ERR does nothing for argp_help.
	* objdump.c (parse_opt): Likewise.
	* readelf.c (parse_opt): Likewise.

2009-01-27  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ops): Notice short length, don't overrun buffer
	(still need to fix LEB128).

	* readelf.c (print_ops): Fix DW_OP_call[24] decoding.

	* readelf.c (print_ops): Print (empty)\n when LEN == 0.

2009-01-24  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_debug_frame_section): Fix computation of vma_base
	for PC-relative mode.

2009-01-23  Ulrich Drepper  <drepper@redhat.com>

	* size.c (process_file): When handling archive, close file descriptor
	here.  For unknown file format also close file descriptor.
	(handle_ar): Don't close file descriptor here.

	* readelf.c (parse_opt): Move code to add to dump_data_sections and
	string_sections list in local function add_dump_section.  Adjust 'x'
	key handling.  For 'a' key add .strtab, .dynstr, and .comment section
	to string_sections list.

2009-01-22  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_phdr): Don't print section mapping when no sections.

	* Makefile.am (AM_CFLAGS): Pass -Wno-format for *_no_Wformat.

	* readelf.c (print_debug_frame_section): Initialize IS_SIGNED to false
	and reset it only for the 'true' cases.

	* Makefile.am (addr2line_no_Wformat): New variable.

	* readelf.c (print_debug_frame_section): Use t instead of j formats
	for ptrdiff_t OFFSET.

2009-01-21  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
	test.  Handle debuginfo files.
	(check_exception_data): First sanity test.

2009-01-17  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_debug_exception_table): Show target of ar_disp
	field.

	* elflint.c (check_program_header): Add most consistency checks for
	PT_GNU_EH_FRAME entry.

	* addr2line.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
	ARGP_PROGRAM_BUG_ADDRESS_DEF.
	* ar.c: Likewise.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* ld.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c: Likewise.
	* readelf.c: Likewise.

	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise.

2009-01-16  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_program_header): Check that PT_GNU_EH_FRAME entry
	matches .eh_frame_hdr section, if it is available.  Also check that
	the segment is allocated, not writable, not executable.

	* readelf.c: Add -e option.  Dump exception and unwind related
	sections.  Add -e to -a.
	(print_encoding_base): Handle DW_EH_PE_omit.
	(print_debug_exception_table): Beginning of support.
	(print_debug): Hook up print_debug_exception_table for
	.gcc_except_table sections.

	* readelf.c (print_debug_frame_section): Some fixes for last change.

2009-01-15  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_encoding): Now a toplevel function.
	(print_relinfo): Likewise.
	(print_encoding_base): Broken out of print_debug_frame_section.
	(print_debug_frame_section): Print different header for .eh_frame
	sections.  Fix recognition of matching CIEs in .debug_frame sections.
	Print absolute offset for PC-relative FDE locations.  Don't print
	table header for FDEs if the table is empty.
	(read_encoded): New function.
	(print_debug_frame_hdr_section): New function.
	(print_debug): Hook up print_debug_frame_hdr_section for .eh_frame_hdr
	sections.

	* readelf.c (handle_relocs_rel): Print section number.
	(print_debug_abbrev_section): Likewise.
	(print_debug_aranges_section): Likewise.
	(print_debug_ranges_section): Likewise.
	(print_debug_info_section): Likewise.
	(print_debug_line_section): Likewise.
	(print_debug_loc_section): Likewise.
	(print_debug_macinfo_section): Likewise.
	(print_debug_pubnames_section): Likewise.
	(print_debug_str_section): Likewise.

2009-01-10  Ulrich Drepper  <drepper@redhat.com>

	* strings.c (read_block): Fix typo in error message string.

2009-01-07  Ulrich Drepper  <drepper@redhat.com>

	* ld.c (ld_new_searchdir): Fix adding to search path list.

2009-01-06  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c: Implement call frame debug section dumping.

2009-01-05  Roland McGrath  <roland@redhat.com>

	* elfcmp.c: Exit with status 2 for errors (like cmp, diff, grep).
	Status 1 (aka EXIT_FAILURE) is only for completed OK but not equal.

2009-01-01  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: Update copyright year.
	* ar.c: Likewise.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* ld.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c: Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise.

2008-12-11  Roland McGrath  <roland@redhat.com>

	* nm.c (sym_name): New function.
	(show_symbols_sysv): Use it in place of elf_strptr.
	(show_symbols_bsd, show_symbols_posix): Likewise.
	Fixes RHBZ#476136.

	* nm.c (show_symbols_sysv): Use an alloca'd backup section name when
	elf_strptr fails.

2008-12-02  Roland McGrath  <roland@redhat.com>

	* readelf.c (count_dwflmod, process_file): Don't presume encoding of
	nonzero OFFSET argument to dwfl_getmodules.

2008-08-07  Roland McGrath  <roland@redhat.com>

	* addr2line.c (main): Pass string to handle_address.
	(see_one_module): New function, subroutine of handle_address.
	(find_symbol): Likewise.
	(handle_address): Take string argument rather than address.
	Convert plain number, or handle strings like "(section)+offset"
	or "symbol+offset".

2008-08-01  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_core_item): Handle 'B' type for 1-origin bitset.
	For 'b' and 'B', print <x-y,z> or ~<x,y-z> rather than 1/0 string.

	* readelf.c (convert): Take new argument SIZE.
	(handle_core_register, handle_core_item): Update callers.
	(handle_core_item): Take new arg REPEATED_SIZE.
	(handle_core_items): Special case for a singleton item,
	let handle_core_item handle repeats if it wants to.

	* readelf.c (handle_core_items): Give abridged output
	for identical groups repeated more than twice.

2008-07-04  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_core_items): Handle ELF_T_ADDR.

2008-04-10  Roland McGrath  <roland@redhat.com>

	* strip.c (handle_elf): Don't keep sections that kept symbol tables
	refer to.  Instead, just be sure to preserve the original symbol
	table in the debug file so those symbols go with their sections and
	can be elided from the stripped version of the symbol table.

	* strip.c (handle_elf): When a discarded section kept in the debug
	file refers to a nondiscard section via sh_link/sh_info, preserve
	that nondiscarded section unmodified in the debug file as well.
	Skip adjustment of discarded sections symbol table references when
	that symbol table is copied in this way.

	* elflint.c (check_symtab): Don't crash from missing symbol names
	after diagnosing bogus strtab.

	* strip.c (handle_elf): Cosmetic cleanup in special section contents
	adjustment for symtab changes.

2008-03-31  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_sections): Add checks on SHF_EXECINSTR sections:
	must be SHT_PROGBITS, must not be SHF_WRITE.  Let backend hook
	excuse a special section.

2008-03-27  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_sections): Check that executability and writability
	of sections is reflected in segment p_flags.

2008-03-26  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_program_header): Accept PT_GNU_RELRO p_flags
	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
	is valid in RELRO.

2008-02-29  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_attributes): Add a cast.
	* elflint.c (check_attributes): Likewise.

	* unaligned.h (add_8ubyte_unaligned): Cast PTR argument for parity
	with [UNALIGNED_ACCESS_CLASS == BYTE_ORDER] definition.
	(add_4ubyte_unaligned, add_2ubyte_unaligned): Likewise.

2008-02-03  Ulrich Drepper  <drepper@redhat.com>

	* i386_ld.c (elf_i386_count_relocations): Implement R_386_TLS_GD
	when linked into executable.
	(elf_i386_create_relocations): Likewise.

2008-02-20  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_attributes): New function.
	(process_elf_file): Call it under -A.

	* elflint.c (check_attributes): Implement it for real.

2008-02-19  Roland McGrath  <roland@redhat.com>

	* elflint.c (special_sections): Handle .gnu.attributes section.
	(check_sections): Likewise.
	(check_attributes): New function.

2008-02-10  Roland McGrath  <roland@redhat.com>

	* elfcmp.c (main): Ignore sh_offset differences in non-SHF_ALLOC
	sections and ET_REL files.

2008-02-02  Ulrich Drepper  <drepper@redhat.com>

	* elf32-i386.script: Add .eh_frame_hdr, .tdata, and .tbss sections.
	* i386_ld.c (elf_i386_count_relocations): Handle R_386_TLS_LDO_32
	and R_386_TLS_LE.
	(elf_i386_create_relocations): Likewise.
	* ld.h (struct ld_state): Add need_tls, tls_start, and tls_tcb
	elements.
	* ldgeneric.c (add_section): If TLS section is used, set need_tls flag.
	(ld_generic_create_outfile): Add PT_TLS entry to program  header.
	Fix generation of PT_GNU_STACK entry.

2008-02-01  Ulrich Drepper  <drepper@redhat.com>

	* ld.c (replace_args): Prevent loop over replacements if the parameter
	is only two characters long.

	* ld.c: Recognize sha1 argument for --build-id parameter.
	* ldgeneric.c (create_build_id_section): Handle sha1.
	(compute_hash_sum): New function.  Broken out of compute_build_id.
	Take hash function and context as parameters.
	(compute_build_id): Use compute_hash_sum for md5 and the new sha1
	implementation.

2008-01-31  Ulrich Drepper  <drepper@redhat.com>

	* elf32-i386.script: Add .note.ABI-tag and .note.gnu.build-id sections.
	* ld.c: Recognize --build-id command line parameter.
	* ld.h: Define scn_dot_note_gnu_build_id.
	(struct ld_state): Add build_id and buildidscnidx elements.
	* ldgeneric.c: Implement --build-id command line parameter.
	* ldlex.l (ID): Recognize - as valid character after the first one.

2008-01-29  Ulrich Drepper  <drepper@redhat.com>

	* ld.c (replace_args): New function.
	(main): Use it to rewrite old-style parameters.

	* elf32-i386.script: Add .gnu.hash section.
	* ldgeneric.c (optimal_bucket_size): A tiny bit more efficient.
	(fillin_special_symbol): Initialize st_size.
	(sortfct_hashval): New function.
	(create_gnu_hash): New function.
	(create_hash): New function.
	(ld_generic_create_outfile): Use the new functions to create the
	hash tables.

	* elflint.c (check_gnu_hash): Fix index value printed in error message.

2008-01-24  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_group): Check that signature symbol for section
	group is not an empty string.
	* ldgeneric.c: Remove magic assignment of indeces in the dynsym
	section.  Start implementation of --hash-style.
	* i386_ld.c: Likewise.
	* ld.c: Recognize --hash-style.
	* ld.h (struct scninfo): Add comdat_group.
	Add additional parameter to finalize_plt callback.

2008-01-22  Ulrich Drepper  <drepper@redhat.com>

	* ld.h (struct callbacks): Add initialize_gotplt.
	(struct scnhead): Add scn_dot_gotplt.
	(struct ld_state): Add gotpltscnidx.
	* i386_ld.c (elf_i386_initialize_plt): Minor optimization.
	(elf_i386_initialize_pltrel): Likewise.
	(elf_i386_initialize_got): There is now a separate .got.plt, so
	don't do the PLT-related work here.  Initialize d_type.
	(elf_i386_initialize_gotplt): New function.
	(elf_i386_plt0): Use ud2a after indirect jump.
	(elf_i386_pic_plt0_entry): Likewise.
	(elf_i386_finalize_plt): Reference now .got.plt.
	(elf_i386_count_relocations): For GOT entries which need no relocation
	don't bump nrel_got.
	(elf_i386_create_relocations): Also get .got.plt.  Rewrite R-386_GOT32
	handling for split .got/.got.plt.
	(elf_i386_ld_init): Initialize callbacks.initialize_gotplt.
	* elf32-i386.script: Sort sections for security.  There are no .got
	input sections.  Add .got.plt.
	* ldgeneric.c (ld_generic_generate_sections): Add .got.plt section.
	(ld_generic_create_outfile): Initialize .got.plt section.
	Use .got.plt address for _GLOBAL_OFFSET_TABLE_ symbol and DT_PLTGOT.

2008-01-19  Ulrich Drepper  <drepper@redhat.com>

	* i386_ld.c (elf_i386_count_relocations): PLT relocations for undefined
	symbols are not carried over into statically linked output files.
	Add dummy entries for more TLS relocations.

	* ld.c (options): Add long names for -( and -).

	* ldgeneric.c (check_definition): For newly found definitions don't
	mark section as used if symbol is absolute.
	(extract_from_archive): Only assign archive sequence number the first
	time the archive is handled.  Update ld_state.last_archive_used
	if any symbol was used.  Remove nround variable.
	(file_process2): When using symbol from an archive, update
	ld_state.group_start_archive, ld_state.archives, and
	ld_state.tailarchives.
	(ld_generic_file_process): If group is not handled anymore, after
	freeing ELF handles for the archives, clear ld_state.archives and
	*nextp.  Fix wrong logic in recognizing first iteration of group
	loop.  When clearing flags, also clear ld_state.group_start_archive.

2008-01-11  Ulrich Drepper  <drepper@redhat.com>

	* objdump.c (show_disasm): Adjust disassembler format string for
	removal of %e.

2008-01-04  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_core_items): Take new arg DESCSZ; if nonzero,
	a size greater than the items cover means multiple sets of items.
	(handle_core_note): Update caller.

2008-01-04  Roland McGrath  <roland@redhat.com>

	* strip.c (handle_elf): Move SHDRIDX defn to silence gcc warning.

2008-01-03  Roland McGrath  <roland@redhat.com>

	* ld.h (linked_from_dso_p): Use __attribute__ ((__gnu_inline__)).

	* elflint.c (check_dynamic): Remove duplicate initializer.

2008-01-02  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: Update copyright year.
	* ar.c: Likewise.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* ld.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c: Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise.

2007-12-30  Ulrich Drepper  <drepper@redhat.com>

	* objdump (show_disasm): Use %e after third parameter.

2007-12-21  Ulrich Drepper  <drepper@redhat.com>

	* strip.c: Fix wrong parenthesis in a few branch predictions.
	* strings.c: Likewise.

2007-12-20  Ulrich Drepper  <drepper@redhat.com>

	* Makefile.am (DEFS): Add DEBUGPRED.
	* addr2line.c: Include debugpred.h.
	* ar.c: Likewise.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c: Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise.
	* debugpred.h: New file.

	* readelf.c (handle_relocs_rel): Use elf_scnshndx.
	(handle_relocs_rela): Likewise.

	* readelf.c: Add lots of likely/unlikely.

	* elflint.c: Minor cleanups.

2007-11-19  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ops): Handle all bad op codes gracefully.
	Print their numbers instead of just ???.

2007-11-09  Roland McGrath  <roland@redhat.com>

	* readelf.c (attr_callback): Handle DW_AT_data_location.
	Handle block forms to mean a DWARF expression for DW_AT_allocated,
	DW_AT_associated, DW_AT_bit_size, DW_AT_bit_offset, DW_AT_bit_stride,
	DW_AT_byte_size, DW_AT_byte_stride, DW_AT_count, DW_AT_lower_bound,
	DW_AT_upper_bound.

2007-10-20  Roland McGrath  <roland@redhat.com>

	* unstrip.c (options): Update -R description.
	(struct symbol): Put symbol details a union with a size_t pointer
	`duplicate'.
	(compare_symbols_output): Use null ->name as marker for discard
	symbols, not zero *->map.
	(copy_elided_sections): Record forwarding pointers for discarded
	duplicates and fill SYMNDX_MAP elements through them.

	* readelf.c (process_file): Set offline_next_address to 0 at start.
	(struct process_dwflmod_args): New type.
	(process_dwflmod): Take args in it, pass fd to process_elf_file.
	(process_file): Update caller; dup FD for passing to libdwfl.
	(process_elf_file): Take new arg FD.  For ET_REL file when
	displaying data affected by libdwfl relocation, open a new Elf handle.

2007-10-17  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_line_section): For invalid data inside a
	unit with plausible length, keep printing at the next unit boundary.

	* readelf.c (attr_callback): Use dwarf_formref_die, not dwarf_formref.

2007-10-16  Roland McGrath  <roland@redhat.com>

	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.

2007-10-15  Roland McGrath  <roland@redhat.com>

	* make-debug-archive.in: New file.
	* Makefile.am (EXTRA_DIST): Add it.
	(make-debug-archive): New target.
	(bin_SCRIPTS, CLEANFILES): Add it.

2007-10-10  Roland McGrath  <roland@redhat.com>

	* elflint.c (special_sections): Add new attrflag value exact_or_gnuld.
	Use it to check MERGE|STRINGS for .debug_str.
	(check_sections): Handle exact_or_gnuld.

2007-10-08  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_core_item): Handle 'T'|0x80 to indicate
	64-bit struct timeval with 32-bit tv_usec.

2007-10-07  Roland McGrath  <roland@redhat.com>

	* readelf.c (check_archive_index): New function.
	(process_file): Call it.  Change signature to take only fd and name.
	Use libdwfl to open the file, then iterate on its modules (multiple
	for an archive) to print file name and call process_elf_file.
	(main): Update caller.  Let process_file do elf_begin.
	(count_dwflmod, process_dwflmod, find_no_debuginfo): New functions.
	(process_elf_file): Take only Dwfl_Module * argument.
	Don't print the file name here.
	(print_debug_*_section): Take Dwfl_Module * argument.
	(print_debug): Likewise.  Update caller.
	(format_dwarf_addr): New function.
	(print_debug_ranges_section): Use it.
	(attr_callback): Likewise.
	(print_debug_line_section, print_debug_loc_section): Likewise.

	* readelf.c (print_debug_ranges_section): Translate all strings.
	(print_debug_loc_section): Likewise.

	* unstrip.c (copy_elided_sections): Initialize SEC.

	* ar.c (do_oper_insert): Put trailing / on short names.

	* arlib.h (MAX_AR_NAME_LEN): Decrease by one.

	* arlib2.c (arlib_add_long_name): Adjust for header size.

	* arlib.c (arlib_finalize): Pad long name table to keep size even.

	* ar.c (do_oper_insert): Use write_retry for padding write.

	* ar.c (do_oper_insert): Initialize CUR_OFF in no_old case.
	Unconditionally set FOUND[CNT]->elf when setting ->mem.
	(remember_long_name): New function.
	(do_oper_insert): Call it.  Correctly use length of basename,
	not original name.  Don't store long name twice for new member.

2007-10-06  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_note): Skip empty segment.
	(check_note_section): Skip empty section.

	* unstrip.c (options, parse_opt, struct arg_info): Grok -R/--relocate.
	(handle_output_dir_module, handle_implicit_modules): Pass it down.
	(handle_dwfl_module): When set, use ET_REL already loaded by Dwfl.
	(compare_alloc_sections): Take new arg REL, ignore address if true.
	(compare_sections): Likewise, pass it down.
	(compare_sections_rel, compare_sections_nonrel): New functions.
	(find_alloc_sections_prelink, copy_elided_sections): Use them
	instead of compare_sections.
	(sections_match): New function, broken out of ...
	(find_alloc_section): ... here.
	(copy_elided_sections): Reorganize section match-up logic.
	Use sections_match for SHF_ALLOC in ET_REL.
	For ET_REL, let the nonzero sh_addr from the debug file dominate.

	* unstrip.c (add_new_section_symbols): Take new arg REL.
	When true, do not update section symbol values.
	(collect_symbols): Likewise.  Update section symbols with address
	of chosen output section, not original section.
	(check_symtab_section_symbols, copy_elided_sections): Update callers.

	* unstrip.c (compare_alloc_sections): At the same address, preserve
	original section order.

	* elflint.c (special_sections): Don't require MERGE|STRINGS for
	.debug_str, it didn't always have them with older tools.

	* elflint.c (check_symtab, check_one_reloc): Ignore sh_addr in ET_REL.

2007-10-05  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_symtab): Allow SHN_UNDEF _GLOBAL_OFFSET_TABLE_ in
	ET_REL file.

	* elflint.c (check_symtab): For _GLOBAL_OFFSET_TABLE_, diagnose
	SHN_UNDEF as "bad section".  Use shndx value in messages.

	* elflint.c (special_sections): Add ".debug_str".  Decrement namelen
	for ".debug" so it matches as a prefix.
	(IS_KNOWN_SPECIAL): New macro.
	(check_sections): Use it for ".plt" match.  Cite wrong SHT_NOBITS
	type even under -d, for a .debug* or .shstrtab section.

	* readelf.c (print_ops): Use hex for address operand.

2007-10-04  Roland McGrath  <roland@redhat.com>

	* unstrip.c (copy_elided_sections): Initialize NDX_SECTION element for
	.gnu_debuglink section to SHN_UNDEF.  Drop STT_SECTION symbols for
	sections mapped to SHN_UNDEF.

2007-10-04  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (dump_archive_index): Avoid warning about uninitialized
	variable with older glibc versions.
	Add some branch prediction.

2007-10-04  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_archive_index): New variable.
	(options, parse_opt): Accept -c/--archive-index to set it.
	(dump_archive_index): New function.
	(process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
	Call dump_archive_index on archives if set.
	(main): Update caller.
	(any_control_option): Give it file scope, moved out of ...
	(parse_opt): ... here.

2007-10-03  Roland McGrath  <roland@redhat.com>

	* unstrip.c (struct arg_info): Add `list' flag.
	(options, parse_opt): Grok -n/--list to set it.
	(list_module): New function.
	(handle_implicit_modules): Call it under -n.

	* elflint.c (check_note_section): New function.
	(check_sections): Call it for SHT_NOTE.

	* readelf.c (handle_notes): Use sections when available.

	* elflint.c (check_note_data): New function, broken out of ...
	(check_note): ... here.  Call it and elf_getdata_rawchunk.

	* readelf.c (handle_auxv_note): Take offset as argument, not buffer.
	Use elf_getdata_rawchunk and gelf_getauxv.
	(handle_notes_data): New function, broken out of ...
	(handle_notes): ... here.  Call it and elf_getdata_rawchunk.

2007-10-01  Roland McGrath  <roland@redhat.com>

	* readelf.c (hex_dump): Fix transposed subtraction generating spaces.

	* readelf.c (hex_dump): Fix line header to be hex instead of decimal.

2007-09-10  Roland McGrath  <roland@redhat.com>

	* readelf.c (options): Give -p optional argument, alias --string-dump.
	(string_sections, string_sections_tail): New static variables.
	(parse_opt): Set them when -p has an argument.
	(print_string_section): New function, broken out of ...
	(print_strings): ... here.  Call it.
	(dump_data_section): New function, broken out of ...
	(dump_data): ... here.  Call it.
	(for_each_section_argument): New function, broken out of ...
	(dump_data): ... here.  Call it.
	(dump_strings): New function.

2007-08-31  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_strings): Typo fix.

2007-08-23  Roland McGrath  <roland@redhat.com>

	* readelf.c (printf_with_wrap): Function removed.
	(REGISTER_WRAP_COLUMN): New macro.
	(handle_core_register): Use print_core_item instead.
	(struct register_info): New type.
	(compare_registers, compare_register_sets): New functions.
	(register_bitpos, compare_sets_by_info): New functions.
	(handle_core_registers): Use those to segregate and sort registers
	for display.

	* readelf.c (ITEM_WRAP_COLUMN): New macro.
	(print_core_item): New function.
	(handle_core_item): Use it instead of printf_with_wrap.
	(compare_core_items, compare_core_item_groups): New functions.
	(handle_core_items): Use them.  Sort by group and force line breaks
	between groups.

	* readelf.c (handle_core_registers, handle_core_items): New functions,
	broken out of ...
	(handle_core_note): ... here.   Call them.

2007-08-22  Roland McGrath  <roland@redhat.com>

	* unstrip.c (new_shstrtab): New function, broken out of ...
	(copy_elided_sections): ... here.

2007-08-20  Roland McGrath  <roland@redhat.com>

	Avoid local function trampolines in nm binary.
	* nm.c (sort_by_address): Move to a static function instead of local
	inside show_symbols.
	(sort_by_name_strtab): New static variable.
	(sort_by_name): Use it.  Move to a static function instead of local
	inside show_symbols.
	(show_symbols): Set sort_by_name_strtab.

2007-08-19  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_auxv_note): New function.
	(handle_notes): Call it.

	* readelf.c (printf_with_wrap, convert): New functions.
	(handle_core_item, (handle_core_register): New functions.
	(handle_notes): Call those with details from ebl_core_note.

2007-08-12  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_note): Accept type 0 with name "Linux".

	* elflint.c (special_sections): Accept SHF_ALLOC for ".note".

	* elflint.c (section_flags_string): Return "none" for 0, not "".

2007-08-11  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_note): Accept NT_GNU_HWCAP, NT_GNU_BUILD_ID.

2007-08-04  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (hex_dump): Use isprint to determine whether to print
	character itself or full stop character.
	(dump_data): No need to check endp for NULL after strtol call.

2007-08-03  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_string_sections): New variable.
	(options, parse_opt): Handle --strings/-p to set it.
	(print_strings): New function.
	(process_elf_file): Call it under -p.

	* readelf.c (options): Add hidden aliases --segments, --sections,
	as taken by binutils readelf.

2007-08-01  Roland McGrath  <roland@redhat.com>

	* readelf.c (dump_data_sections, dump_data_sections_tail):
	New variables.
	(options, parse_opt): Handle --hex-dump/-x, set them.
	(hex_dump): New function.
	(dump_data): New function, call it.
	(process_elf_file): Call it.

2007-07-25  Roland McGrath  <roland@redhat.com>

	* addr2line.c (show_symbols): New variable.
	(print_addrsym): New function.
	(handle_address): Call it.
	(options, parse_opt): Handle -S/--symbols.

2007-06-05  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: Update for latest autoconf header.
	* ar.c: Likewise.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* ld.c: Likewise.
	* ldgeneric.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c: Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.
	* unstrip.c: Likewise.

2007-05-18  Roland McGrath  <roland@redhat.com>

	* unstrip.c (copy_elided_sections): Match up non-NOBITS sections with
	stripped file, so as not to duplicate a section copied in both.

	* strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file.

2007-05-17  Roland McGrath  <roland@redhat.com>

	* unstrip.c (copy_elided_sections): Don't call gelf_newphdr for 0.

	* unstrip.c (handle_file): Tweak BIAS != 0 warning.

	* unstrip.c (handle_file): Take new arg CREATE_DIRS.  If set,
	call make_directories here.
	(handle_explicit_files): Take new arg CREATE_DIRS, pass it down.
	(handle_dwfl_module): Likewise.
	(handle_implicit_modules): Update callers.
	(handle_output_dir_module): Likewise.  Don't do make_directories here.

	* unstrip.c (get_section_name): New function, broken out of ...
	(copy_elided_sections): here.  Update callers.
	(find_alloc_section): Broken out of ...
	(copy_elided_sections): ... here.  Update caller.
	(symtab_count_leading_section_symbols): Take new arg NEWSYMDATA,
	update STT_SECTION symbols' st_value fields as a side effect.
	(check_symtab_section_symbols): Update caller.
	(add_new_section_symbols): Set st_value in symbols added.
	(collect_symbols): Reset S->value for STT_SECTION symbols recorded.
	Take new arg SPLIT_BSS.  Adjust S->shndx recorded for symbols moved
	from .bss to .dynbss.
	(find_alloc_sections_prelink): New function.  Associate debug file
	allocated SHT_NOBITS shdrs with stripped moved by prelink via
	.gnu.prelink_undo information.
	(copy_elided_sections): Call it when we couldn't find every allocated
	section.  Don't use a debug file non-NOBITS section if SHF_ALLOC.
	Take STRIPPED_EHDR arg instead of E_TYPE and PHNUM.
	(handle_file): Update callers.

	* unstrip.c (copy_elided_sections): Ignore unfound unallocated section
	named ".comment".

	* elflint.c (check_sections): Fix association of segments with
	sections when p_memsz > p_filesz.

2007-04-29  Roland McGrath  <roland@redhat.com>

	* addr2line.c (options, main): Tweak argp group settings to fix
	usage output.

2007-04-28  Roland McGrath  <roland@redhat.com>

	* strip.c (handle_elf): Update debug file's SHT_NOBITS sections'
	sizes to match sections adjusted in the stripped file.

2007-04-24  Roland McGrath  <roland@redhat.com>

	* elfcmp.c (OPT_HASH_INEXACT): New macro.
	(hash_inexact): New variable.
	(options, parse_opt): Add --hash-inexact option to set it.
	(hash_content_equivalent): New function.
	(main): Call it for differing SHT_HASH sections under --hash-inexact.

2007-04-23  Roland McGrath  <roland@redhat.com>

	* unstrip.c: New file.
	* Makefile.am (bin_PROGRAMS): Add it.
	(unstrip_LDADD): New variable.

	* strip.c (options): Allow --output for -o.

2007-02-15  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c: Remove unused code.  Add a few consts.

2007-02-15  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug): Fix brainos in SHDR test.

2007-02-05  Roland McGrath  <roland@redhat.com>

	* ar.c: Include <limits.h>, since we use LONG_MAX.

2007-02-05  Ulrich Drepper  <drepper@redhat.com>

	* ar.c: Add ugly hack to work around gcc complaining that we
	ignore fchown's return value.
	(do_oper_insert): Handle error when writing padding.
	* ranlib.c: Add fchown complain work around.

	* arlib.c: Make symtab a global variable.  Change all users.
	* arlib2.c: Likewise.
	* ranlib.c: Likewise.
	* ar.c: Likewise.
	* arlib.h: Declare it.

2007-01-11  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_sections): Use ebl_machine_section_flag_check on
	SHF_MASKPROC bits separately from generic sh_flags validation.

2007-02-04  Ulrich Drepper  <drepper@redhat.com>

	* ar.c: New file.
	* arlib.c: New file.
	* arlib2.c: New file.
	* arlib.h: New file.
	* Makefile (noinst_LIBRARIES): Add libar.
	(libar_a_SOURCES): Define.
	(ar_LDADD): Define.
	(CFLAGS_ar): Define.
	* ranlib.c: Change to use arlib.

	* elflint.c (check_symtab): Work around GNU ld bug which omits
	sections but not symbols in those sections.

2007-01-10  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: Update copyright year.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* ld.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c:  Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.

2006-12-09  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (compare_hash_gnu_hash): New function.  Report if the
	two hash tables have different content (module expected omission
	of undefined symbols).

2006-10-31  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_program_header): Don't complain about
	p_filesz > p_memsz if p_memsz is zero and p_type is PT_NOTE.

2006-09-19  Jakub Jelinek  <jakub@redhat.com>

	* strip.c (process_file): Disallow -f on archives.

2006-10-09  Roland McGrath  <roland@redhat.com>

	* Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).

2006-08-29  Roland McGrath  <roland@redhat.com>

	* Makefile.am (MAINTAINERCLEANFILES): New variable.

	* readelf.c (handle_relocs_rel): Typo fix, test DESTSHDR properly.
	Reported by Christian Aichinger <Greek0@gmx.net>.

	* elflint.c (valid_e_machine): Add EM_ALPHA.
	Reported by Christian Aichinger <Greek0@gmx.net>.

2006-08-08  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
	Keep track of which "high DT" entries are present.
	Check that either old or GNU-style hash table is present.
	If GNU-style hash table is used a symbol table is mandatory.
	Check that if any prelink entry is present all of them are.
	(check_gnu_hash): Only fail for undefined symbols in GNU-style hash
	table if they don't refer to functions.

2006-07-17  Roland McGrath  <roland@redhat.com>

	* elflint.c (struct version_namelist): Use GElf_Versym for `ndx' field.
	(add_version): Likewise for argument.
	(check_versym): Cast constant to GElf_Versym for comparison.

2006-07-12  Roland McGrath  <roland@redhat.com>

	* readelf.c (handle_gnu_hash): Add casts for machines where
	Elf32_Word != unsigned int.

2006-07-12  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_sysv_hash64): Fix printf format.

2006-07-11  Roland McGrath  <roland@redhat.com>

	* addr2line.c (options): English fix in -f doc string.

	* addr2line.c (use_comp_dir): New variable.
	(options, parse_opt): Grok -A/--absolute to set it.
	(handle_address): If set, prepend dwfl_line_comp_dir results to
	relative file names.

2006-07-06  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c: Adjust for latest new hash table format.
	* readelf.c: Likewise.

	* elflint.c (check_versym): Ignore hidden bit when comparing version
	numbers.

2006-07-05  Ulrich Drepper  <drepper@redhat.com>

	* ldgeneric.c (ld_generic_create_outfile): Correctly recognize
	discarded COMDAT symbols.

	* i386_ld.c (elf_i386_count_relocations): Lot of corrections.
	(elf_i386_create_relocations): Likewise.
	* ld.h (struct symbol): Add local and hidden bits.
	* ld.c (create_special_section_symbol): These synthsized symbols
	are local and hidden.
	* ldgeneric.c (file_process2): Check whether input file matches
	the emulation.
	(fillin_special_symbol): Create symbols as local and/or hidden
	if requested.
	(ld_generic_create_outfile): Make local copy of symbol.
	Don't hide global, defined symbols in dynamic symbol table unless
	requested.  Synthetic symbols have no version information.

	* elflint.c: Add support for checking 64-bit SysV-style hash tables.
	* readelf.c: Add support for printing 64-bit SysV-style hash tables.

2006-07-04  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (is_rel_dyn): Fix and extend DT_RELCOUNT/DT_RELACOUNT
	testing.

2006-07-03  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c: Add testing of DT_GNU_HASH.
	* readelf.c: Implement showing histogram for DT_GNU_HASH section.

	* Makefile.am: Add hacks to create dependency files for non-generic
	linker.

2006-06-12  Ulrich Drepper  <drepper@redhat.com>

	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
	section if creating a DSO and no interpreter is given.
	(ld_generic_create_outfile): Don't store reference to symbols in
	discarded COMDAT groups.  Don't create PHDR and INTERP program header
	for DSO if no interpreter is specified.
	(create_verneed_data): Pretty printing.

	* ldscript.y (content): If a DSO is created don't set default
	interpreter from linker script.

	* i386_ld.c (elf_i386_count_relocations): Do not add relocations
	for symbols in discarded COMDAT groups.
	(elf_i386_create_relocations): Likewise.
	* ld.h (struct scninfo): Add unused_comdat.
	* ldgeneric.c (add_section): Also check group signature when
	matching COMDAT sections.
	(add_relocatable_file): Ignore symbols in COMDAT group which are
	discarded.

	* elflint.c (check_one_reloc): For *_NONE relocs only check type
	and symbol reference.

2006-06-11  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_dynamic): Fix checking value of tags which are
	offsets in the string section.  Make sure DT_STRTAB points to the
	section referenced in sh_link.

	* ld.c (options): Add headers.  Add short option 'R' for '--rpath'.

	* ld.c: Recognize --eh-frame-hdr option.
	* ld.h (struct ld_state): Add eh_frame_hdr field.
	* ldgeneric.c (struct unw_eh_frame_hdr): Define.

	* ldgeneric.c (add_section): Use ebl_sh_flags_combine instead of
	SH_FLAGS_COMBINE.
	(add_relocatable_file): Minor optimization of last change.
	(match_section): Don't preserve SHF_GROUP flag any longer.

2006-06-10  Ulrich Drepper  <drepper@redhat.com>

	* ld.c (parse_z_option): Recognize execstack and noexecstack.
	Handle record and ignore as position dependent options.
	(parse_z_option_2): Handle ignore and record here.
	* ld.h (struct ld_state): Add execstack field.
	* ldgeneric.c (add_relocatable_file): Recognize .note.GNU-stack
	sections.
	(ld_generic_create_outfile): Fix program header creation in native
	linker.  Add PT_GNU_STACK program header.

2006-06-09  Ulrich Drepper  <drepper@redhat.com>

	* i386_ld.c (elf_i386_finalize_plt): Don't change symbol table entries
	for PLT entries if there is no local definition.

	* ld.c (parse_option): Handle -z ignore like --as-needed and
	-z record like --no-as-needed.
	* ld.h (struct ld_state): Remove ignore_unused_dsos field.
	* ldgeneric.c (new_generated_scn): Always compute ndt_needed by
	looping over DSOs.  When deciding about adding DT_NEEDED entries
	use ->as_needed instead of ignore_unused_dsos.

2006-05-31  Ulrich Drepper  <drepper@redhat.com>

	* ld.c: Recognize --as-needed and --no-as-needed options.
	* ld.h (struct usedfile): Add as_needed field.
	(struct ld_state): Likewise.
	* ldgeneric.c (ld_handle_filename_list): Copy as_needed flag from
	the list.
	* ldscript.y (filename_id_list): Split to correctly parse all
	combinations.
	(mark_as_needed): Fix loop.

2006-05-28  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c (print_dwarf_function): Use unsigned type for lineno
	and colno.

2006-05-27  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (handle_relocs_rela): Better notations for addon value.
	(print_ehdr): Distinguish e_ident[EI_VERSION] from e_version.

2006-04-04  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: Update copyright year.
	* elfcmp.c: Likewise.
	* elflint.c: Likewise.
	* findtextrel.c: Likewise.
	* ld.c: Likewise.
	* nm.c: Likewise.
	* objdump.c: Likewise.
	* ranlib.c: Likewise.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strings.c: Likewise.
	* strip.c: Likewise.

2006-03-09  Roland McGrath  <roland@redhat.com>

	* Makefile.am (AM_LDFLAGS): New variable.

2006-03-01  Roland McGrath  <roland@redhat.com>

	* readelf.c (dwarf_tag_string, dwarf_attr_string): Update name tables
	for dwarf.h changes matching 3.0 spec.
	(dwarf_encoding_string, dwarf_lang_string, print_ops): Likewise.

2005-12-04  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_one_reloc): If relocation section is not loaded,
	don't check whether the relocations modify read-only sections or
	loaded and unloaded sections.

2005-11-28  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_one_reloc): Take additional parameters.  Use
	them to determine whether relocation is valid in this type of
	file.  DSOs and executables can contain relocation sections in
	unloaded sections which just show the relocations the linker
	applied.  Adjust all callers.
	(check_program_header): Check that PT_PHDR is loaded and that offset
	matches the one in the ELF header.

2005-10-26  Roland McGrath  <roland@redhat.com>

	* nm.c (get_var_range): dwarf_getloclist -> dwarf_getlocation.

2005-09-03  Ulrich Drepper  <drepper@redhat.com>

	* strip.c (handle_elf): Unify some error messages.
	* ld.c (main): Likewise.
	* ldgeneric.c (open_elf): Likewise.
	* elfcmp.c (main): Likewise.
	* elflint.c (check_elf_header): Likewise.

	* size.c (process_file): Fix typo in error message.

	* readelf.c: Lots of little cleanups.  Use _unlocked functions.

2005-09-02  Ulrich Drepper  <drepper@redhat.com>

	* strings.c (main): Reset elfmap variable after munmap call.
	[_MUDFLAP] (map_file): Simplify mudflap debugging by not using mmap.

2005-08-28  Ulrich Drepper  <drepper@redhat.com>

	* ranlib.c: Don't define pread_retry and write_retry here.

	* Makefile.an [BUILD_STATIC] (libdw): Add -ldl.
	(CLEANFILES): Add *.gcno *.gcda *.gconv.

	* strings.c (process_chunk): Reorder expressions in conditional
	(process_chunk_mb): Likewise.

	* strings.c: New file.
	* Makefile.am (bin_PROGRAMS): Add strings.
	(strings_no_Wstring): Define.
	(strings_LDADD): Define.

2005-08-27  Roland McGrath  <roland@redhat.com>

	* addr2line.c (dwarf_diename_integrate): Function removed.
	(print_dwarf_function): Use plain dwarf_diename.

2005-08-24  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_versym): Versioned symbols should not have
	local binding.

2005-08-15  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be
	undefined.

	* Makefile.am: Add rules to build ranlib.
	* ranlib.c: New file.

2005-08-14  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_sections): Use ebl_section_type_name and allow any
	sh_type it recognizes.

	* elflint.c (check_sections): Print unknown flags in hex, don't
	truncate high bits.  Print section number and name for unknown type.

2005-08-13  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_program_header): Use ebl_segment_type_name and
	allow any p_type it recognizes.  Include p_type value in error
	message for unknown type.

2005-08-13  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_symtab): Simplify last change a bit.  Pass ehdr
	to ebl_check_special_symbol.
	(check_sections): Pass ehdr to ebl_bss_plt_p.

2005-08-12  Roland McGrath  <roland@redhat.com>

	* elflint.c (check_symtab): Check that _GLOBAL_OFFSET_TABLE_ st_shndx
	refers to the right section if it's not SHN_ABS.
	Let ebl_check_special_symbol override _G_O_T_ value and size checks.

	* elflint.c (check_sections): Don't complain about a non-NOBITS
	section taking no segment space, if it's sh_size is 0.

	* elflint.c (check_sections): Use ebl_bss_plt_p to see if .plt should
	be PROGBITS or NOBITS.

	* elflint.c (check_symtab): Use ebl_check_special_symbol to override
	standard st_value and st_size checks.

2005-07-28  Roland McGrath  <roland@redhat.com>

	* addr2line.c (options, parse_opt): Don't handle -e here.
	(executable): Variable removed.
	(argp_children): New static variable.
	(argp): Use it.  Make const.
	(main): Fill in argp_children from dwfl_standard_argp ().
	Let libdwfl handle file selection, pass Dwfl handle to handle_address.
	(print_dwarf_function): New function.  Try to figure out inline chain.
	(elf_getname): Function removed, libdwfl does it for us.
	(handle_address): Take Dwfl handle instead of Elf, Dwarf handles.
	Use dwfl_module_addrname instead of elf_getname.
	Use dwfl_module_getsrc and dwfl_lineinfo instead of libdw calls.
	* Makefile.am (INCLUDES): Add libdwfl directory to path.

2005-08-10  Ulrich Drepper  <drepper@redhat.com>

	* strip.c (parse_opt): STATE parameter is now used.
	Various little cleanups.

	* readelf.c (print_debug_line_section): Correct fallout of renaming
	of DW_LNS_set_epilog_begin.

2005-08-08  Roland McGrath  <roland@redhat.com>

	* strip.c (options, parse_opt): Grok -R .comment for compatibility
	with binutils strip.  Likewise -d, -S, as aliases for -g.
	Likewise ignore -s/--strip-all.

2005-08-07  Roland McGrath  <roland@redhat.com>

	* strip.c (process_file): Open read-only when using a different output
	file.

2005-08-06  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (in_nobits_scn): New function.
	(check_versym): Allow references for defined symbols against versions
	of other DSOs also for symbols in nobits sections.
	Move a few variables around.

	* Makefile.am (AM_CFLAGS): Avoid duplication.
	Link with statis libs if BUILD_STATIC.

2005-08-05  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c: Many, many more tests.  Mostly related to symbol
	versioning.  Those sections should now be completely checked.

	* readelf.c (print_dynamic): Use gelf_offscn.

2005-08-04  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c: Add lots more tests: more extension symbol table sanity,
	versioning section tests, hash table tests.  General cleanup.

2005-08-02  Ulrich Drepper  <drepper@redhat.com>

	* objdump.c: New file.
	* Makefile.am (bin_PROGRAMS): Add objdump.
	(objdump_LDADD): Define.

	* elflint.c (check_reloc_shdr): New function split out from check_rela
	and check_rel.
	(check_one_reloc): New function.  Likewise.
	(check_rela): Use check_reloc_shdr and check_one_reloc.
	(check_rel): Likewise.
	(check_program_header): Check that PT_DYNAMIC entry matches .dynamic
	section.
	Add checks that relocations against read-only segments are flagged,
	that the text relocation flag is not set unnecessarily, and that
	relocations in one section are either against loaded or not-loaded
	segments.

2005-08-01  Ulrich Drepper  <drepper@redhat.com>

	* elfcmp.c (main): Ignore section count and section name string table
	section index.

2005-07-27  Roland McGrath  <roland@redhat.com>

	* elfcmp.c: Include <locale.h>.

2005-07-27  Ulrich Drepper  <drepper@redhat.com>

	* elfcmp.c: Print name and index of differing section.

2005-07-24  Ulrich Drepper  <drepper@redhat.com>

	* elfcmp.c: Implement comparing gaps between sections.

2005-07-23  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c: Include libeblP.h instead of libebl.h.
	* nm.c: Likewise.
	* readelf.c: Likewise.
	* elfcmp.c: Likewise.

	* elfcmp.c (main): Compare individual ELF header fields, excluding
	e_shoff instead of the whole struct at once.
	Use ebl_section_strip_p instead of SECTION_STRIP_P.
	* strip.c: Use ebl_section_strip_p instead of SECTION_STRIP_P.

2005-07-22  Ulrich Drepper  <drepper@redhat.com>

	* elfcmp.c (main): Take empty section into account when comparing
	section content.

	* elflint.c (check_dynamic): Check that d_tag value is >= 0 before
	using it.

2005-07-21  Ulrich Drepper  <drepper@redhat.com>

	* elfcmp.c: New file.
	* Makefile.am (bin_PROGRAMS): Add elfcmp.
	(elfcmp_LDADD): Define.

	* elflint.c (check_rela): Check that copy relocations only reference
	object symbols or symbols with unknown type.
	(check_rel): Likewise.

2005-06-08  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_ops): Add consts.

2005-05-31  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_abbrev_section): Don't bail after first CU's
	abbreviations.  Print a header line before each CU section.

	* readelf.c (print_debug_loc_section): Fix indentation for larger
	address size.

2005-05-30  Roland McGrath  <roland@redhat.com>

	* readelf.c (print_debug_line_section): Print section offset of each
	CU's table, so they are easy to find from seeing the stmt_list value.

	* readelf.c (dwarf_attr_string): Add all attributes in <dwarf.h>.
	(attr_callback): Grok DW_AT_ranges and print offset in hex.

	* readelf.c (attr_callback): Add 2 to addrsize * 2 for %#0* format.
	(print_debug_ranges_section, print_debug_loc_section): Likewise.

	* readelf.c (print_ops): Take different args for indentation control.
	(attr_callback): Caller updated.
	Grok several more block-form attributes as being location expressions.
	For those same attributes with udata forms, format output differently
	for location list offset.
	(print_debug_loc_section): Implement it for real.

	* readelf.c (options): Mention ranges for --debug-dump.
	(enum section_e): Add section_ranges.
	(parse_opt): Grok "ranges" for -w/--debug-dump.
	(print_debug_ranges_section): New function.
	(print_debug): Handle .debug_ranges section.

2005-05-30  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (handle_notes): At least x86-64 need not have the note
	section values aligned to 8 bytes.

2005-05-18  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (dwarf_tag_string): Add new tags.

2005-05-08  Roland McGrath  <roland@redhat.com>

	* strip.c (handle_elf): Don't translate hash and versym data formats,
	elf_getdata already did it for us.

2005-05-07  Ulrich Drepper  <drepper@redhat.com>

	* Makefile.am (findtextrel_LDADD): Add $(libmudflap).
	(addr2line_LDADD): Likewise.

2005-05-03  Roland McGrath  <roland@redhat.com>

	* strip.c (handle_elf): Apply symbol table fixups to discarded
	relocation sections when they are being saved in the debug file.

	* strip.c (handle_elf): Pass EHDR->e_ident[EI_DATA] to gelf_xlatetom
	and gelf_xlatetof, not the native byte order.

	* strip.c (parse_opt): Give error if -f or -o is repeated.
	(main): Exit if argp_parse returns nonzero.

	* strip.c (debug_fname_embed): New variable.
	(options, parse_opt): New option -F to set it.

2005-05-07  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (parse_opt): Make any_control_option variable
	local.  Simplify some tests.

2005-05-03  Roland McGrath  <roland@redhat.com>

	* strip.c (crc32_file): Function removed (now in ../lib).

2005-05-03  Roland McGrath  <roland@redhat.com>

	* elflint.c (is_debuginfo): New variable.
	(options, parse_opt): New option --debuginfo/-d to set it.
	(check_sections): If is_debuginfo, don't complain about SHT_NOBITS.
	(check_note): If is_debuginfo, don't try to get note contents.

2005-04-24  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_debug_abbrev_section): Don't print error when end of
	section reached.

2005-04-14  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (dwarf_encoding_string): New function.
	(dwarf_inline_string): New function.
	(dwarf_access_string): New function.
	(dwarf_visibility_string): New function.
	(dwarf_virtuality_string): New function.
	(dwarf_identifier_case_string): New function.
	(dwarf_calling_convention_string): New function.
	(dwarf_ordering_string): New function.
	(dwarf_discr_list_string): New function.
	(attr_callback): Decode man more attribute values.

2005-04-01  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: Finish implementation of -f option.

2005-03-29  Ulrich Drepper  <drepper@redhat.com>

	* addr2line.c: New file.
	* Makefile.am (bin_PROGRAMS): Add addr2line.
	Define addr2line_LDADD.

	* findtextrel.c: Use new dwarf_addrdie function.

	* findtextrel.c: Fix usage message and re-add accidentally removed
	line.

2005-03-28  Ulrich Drepper  <drepper@redhat.com>

	* findtextrel.c: New file.
	* Makefile: Add rules to build findtextrel.

2005-02-15  Ulrich Drepper  <drepper@redhat.com>

	* ldlex.l: Provide ECHO definition to avoid warning.

	* elflint.c (check_program_header): Fix typo in RELRO test.

	* Makefile.am (AM_CFLAGS): Add more warning options.
	* elflint.c: Fix warnings introduced by the new warning options.
	* i386_ld.c: Likewise.
	* ld.c: Likewise.
	* ld.h: Likewise.
	* ldgeneric.c: Likewise.
	* nm.c: Likewise.
	* readelf.c: Likewise.
	* sectionhash.c: Likewise.
	* size.c: Likewise.
	* string.c: Likewise.

2005-02-05  Ulrich Drepper  <drepper@redhat.com>

	* Makefile.am: Check for text relocations in constructed DSOs.

	* Makefile.am [MUDFLAP] (AM_CFLAGS): Add -fmudflap.  Link all apps
	with -lmudflap.

	* ldscript.y: Add as_needed handling.
	* ldlex.l: Recognize AS_NEEDED token.
	* ld.h (struct filename_list): Add as_needed flag.

2005-02-04  Ulrich Drepper  <drepper@redhat.com>

	* elflint.c (check_symtab): Correctly determine size of GOT section.

2005-01-19  Ulrich Drepper  <drepper@redhat.com>

	* ld.c: Remove unnecessary more_help function.  Print bug report
	address using argp.
	* strip.c: Likewise.
	* size.c: Likewise.
	* nm.c: Likewise.
	* readelf.c: Likewise.
	* elflint.c: Likewise.

	* elflint.c (main): Don't check for parameter problems here.
	(parse_opt): Do it here, where we get informed about some of them
	anyway.

	* readelf.c (main): Don't check for parameter problems here.
	(parse_opt): Do it here, where we get informed about some of them
	anyway.

2005-01-11  Ulrich Drepper  <drepper@redhat.com>

	* strip.c: Update copyright year.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* nm.c: Likewise.
	* ld.c: Likewise.
	* elflint.c: Likewise.

	* elflint.c (check_symtab): Don't warn about wrong size for
	_DYNAMIC and __GLOBAL_OFFSET_TABLE__ for --gnu-ld.

2004-10-05  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_phdr): In section mapping, also indicate
	sections in read-only segments.

2004-09-25  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c: Make compile with gcc 4.0.
	* strip.c: Likewise.

2004-08-16  Ulrich Drepper  <drepper@redhat.com>

	* strip.c (handle_elf): Rewrite dynamic memory handling to use of
	allocate to work around gcc 3.4 bug.

2004-01-25  Ulrich Drepper  <drepper@redhat.com>

	* ldlex.l (invalid_char): Better error message.

2004-01-23  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c: Print SHT_GNU_LIBLIST sections.

	* none_ld.c: New file.

2004-01-21  Ulrich Drepper  <drepper@redhat.com>

	* Makefile.am: Enable building of machine specific linker.

2004-01-20  Ulrich Drepper  <drepper@redhat.com>

	* Makefile.am: Support building with mudflap.

	* i386_ld.c: Fix warnings gcc 3.4 spits out.
	* ldgeneric.c: Likewise.
	* ldscript.y: Likewise.
	* readelf.c: Likewise.
	* strip.c: Likewise.

	* readelf.c (print_debug_line_section): Determine address size
	correctly.

2004-01-19  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_phdr): Show which sections are covered by the
	PT_GNU_RELRO entry.

	* elflint.c (check_program_header): Check PT_GNU_RELRO entry.

	* readelf.c (print_debug_macinfo_section): Implement.

2004-01-18  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_debug_line_section): Implement.

2004-01-17  Ulrich Drepper  <drepper@redhat.com>

	* src/elflint.c: Use PACKAGE_NAME instead of PACKAGE.
	* src/ld.c: Likewise.
	* src/nm.c: Likewise.
	* src/readelf.c: Likewise.
	* src/size.c: Likewise.
	* src/strip.c: Likewise.

	* strip.c: Add a few more unlikely.  Reduce scope of some variables.

	* Makefile.am: Support building with mudflap.

2004-01-16  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_debug_info_section): Free dies memory.

	* readelf.c: Print .debug_info section content.

2004-01-13  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_shdr): Add support for SHF_ORDERED and SHF_EXCLUDE.

2004-01-12  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (print_debug_aranges): Implement using libdw.

2004-01-11  Ulrich Drepper  <drepper@redhat.com>

	* nm.c: Adjust for Dwarf_Files type and dwarf_lineno interface change.

	* readelf.c: Use libdw instead of libdwarf.  Not all of the old
	behavior is available yet.
	* Makefile.am: Link readelf with libdw.  Remove libdwarf include path.

2004-01-09  Ulrich Drepper  <drepper@redhat.com>

	* nm.c (get_local_names): Adjust call to dwarf_nextcu.

	* nm.c: Implement getting information about local variables.

2004-01-07  Ulrich Drepper  <drepper@redhat.com>

	* nm.c: Read also debug information for local symbols.

2004-01-05  Ulrich Drepper  <drepper@redhat.com>

	* nm.c: Shuffle dwarf handling code around so the maximum column
	width can be computed ahead of printing.  Avoid collection symbols
	which are not printed anyway.

	* nm.c: Rewrite dwarf handling to use libdw.
	* Makefile.am (AM_CFLAGS): Add -std parameter.
	(INCLUDES): Find header in libdw subdir.
	(nm_LDADD): Replace libdwarf with libdw.

	* elflint.c: Update copyright year.
	* readelf.c: Likewise.
	* size.c: Likewise.
	* strip.c: Likewise.
	* nm.c: Likewise.

2003-12-31  Ulrich Drepper  <drepper@redhat.com>

	* strip.c (process_file): Close file before returning.

2003-11-19  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (handle_dynamic): Make column for tag name wider.

2003-09-29  Ulrich Drepper  <drepper@redhat.com>

	* readelf.c (handle_dynamic): Always terminate tag name with a space.

2003-09-25  Ulrich Drepper  <drepper@redhat.com>

	* strip.c (process_file): Don't mmap the input file, we modify the
	data structures and don't want the change end up on disk.

2003-09-23  Jakub Jelinek  <jakub@redhat.com>

	* unaligned.h (union u_2ubyte_unaligned,
	union u_4ubyte_unaligned, union u_8ubyte_unaligned): Add
	packed attribute.
	(add_2ubyte_unaligned, add_4ubyte_unaligned,
	add_8ubyte_unaligned): Avoid nesting bswap_NN macros.
	Read/store value through _ptr->u instead of *_ptr.

2003-09-22  Ulrich Drepper  <drepper@redhat.com>

	* size.c (show_sysv): Change type of maxlen to int.

	* strip.c (handle_elf): Handle the 64-bit archs which is 64-bit
	buckets.

	* i386_ld.c: Many many fixes and extensions.
	* ld.c: Likewise.
	* ldgeneric.c: Likewise.

2003-08-16  Ulrich Drepper  <drepper@redhat.com>

	* ldgeneric.c (check_definition): Don't add symbol on dso_list if
	the reference is from another DSO.

2003-08-15  Ulrich Drepper  <drepper@redhat.com>

	* ldgeneric.c (find_entry_point): It is no fatal error if no entry
	point is found when creating a DSO.

2003-08-14  Ulrich Drepper  <drepper@redhat.com>

	* ld.c (main): Always call FLAG_UNRESOLVED.
	* ldgeneric.c (ld_generic_flag_unresolved): Only complain about
	undefined symbols if not creating DSO or ld_state.nodefs is not set.

2003-08-13  Ulrich Drepper  <drepper@redhat.com>

	* Makefile.in: Depend on libebl.a, not libebl.so.

	* ld.c (main): Mark stream for linker script as locked by caller.
	(read_version_script): Likewise.
	* ldlex.c: Define fread and fwrite to _unlocked variant.

	* i386_ld.c (elf_i386_finalize_plt): Replace #ifdefs with uses of
	target_bswap_32.
	* unaligned.h: Define target_bswap_16, target_bswap_32, and
	target_bswap_64.
	(store_2ubyte_unaligned, store_4ubyte_unaligned,
	store_8ubyte_unaligned): Define using new macros.

2003-08-12  Ulrich Drepper  <drepper@redhat.com>

	* i386_ld.c (elf_i386_finalize_plt): Use packed structs to access
	possibly unaligned memory.  Support use of big endian machines.

2003-08-11  Ulrich Drepper  <drepper@redhat.com>

	* Moved to CVS archive.