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
|
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.
|