This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathChangeLog
2035 lines (1367 loc) · 64.1 KB
/
ChangeLog
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
2023-09-09 Yanglin Xun <[email protected]>
* libelf.h: Fix typo in comment
2023-04-01 Youling Tang <[email protected]>
* elf.h: Update from glibc.
2023-03-03 Mark Wielaard <[email protected]>
* libelf.h: Define ELFCOMPRESS_ZSTD if undefined.
(elf_compress): Document ELFCOMPRESS_ZSTD compression type.
2023-02-20 Mark Wielaard <[email protected]>
* gnuhash_xlate.h (elf_cvt_gnuhash): memmove any left over bytes.
2022-11-30 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2022-10-28 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2022-10-21 Yonggang Luo <[email protected]>
* libelf_crc32.c: Remove LIB_SYSTEM_H define.
2022-09-20 Yonggang Luo <[email protected]>
* elf32_checksum.c: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
* elf32_xlatetof.c: Likewise.
* elf_getarsym.c: Likewise.
2022-10-16 Yonggang Luo <[email protected]>
* common.h: Remove ar.h, byteswap.h and endian.h.
* elf32_checksum.c: Remove endian.h.
* elf32_getphdr.c: Remove unistd.h and system.h.
* elf32_getshdr.c: Remove unistd.h.h and system.h.
* elf32_updatefile.c: Remove unistd.h, sys/mman.h and system.h.
* elf32_updatenull.c: Remove endian.h and system.h.
* elf32_xlatetof.c: Remove endian.h.
* elf32_xlatetom.c: Likewise.
* elf_begin.c: Remove unistd.h, sys/mman.h and system.h.
* elf_cntl.c: Remove unistd.h.
* elf_compress.c: Remove system.h and unistd.h.
* elf_end.c: Remove sys.mman.h.
* elf_getarsym.c: Remove byteswap.h, endian.h, unistd.h and
system.h.
* elf_getdata.c: Remove unistd.h and system.h.
* elf_getdata_rawchunk.c: Remove unistd.h and system.h.
* elf_getshdrstrndx.c: Likewise.
* elf_readall.c: Likewise.
* elf_update.c: Remove unistd.h and sys/mman.h.
* gelf_xlate.c: Remove byteswap.h.
* libelfP.h: Add system.h.
* nlist.c: Remove unistd.h.
2022-08-28 Mark Wielaard <[email protected]>
* elf_begin.c (__libelf_next_arhdr_wrlock): Add OCT_FIELD macro,
like INT_FIELD but use strtol with octal base 8. Use for ar_mode.
2022-08-08 Andreas Schwab <[email protected]>
* elf.h: Update from glibc.
2022-04-24 Mark Wielaard <[email protected]>
* elf_update.c (write_file): Check HAVE_MREMAP.
2022-04-01 Mark Wielaard <[email protected]>
* libelfP.h (struct Elf_Data_Chunk): Add an int64_t offset field.
* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check whether the
requested chunk, offset, size and type, was already handed out.
Set new Elf_Data_Chunk offset field.
2022-03-29 Mark Wielaard <[email protected]>
* gelf_xlate.c (START): Define and use sz variable.
(END): Use sz variable to decide whether to do a memmove.
2022-03-24 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2022-03-22 Mark Wielaard <[email protected]>
* elf_getdata.c (__libelf_type_aligns): ELF_T_GNUHASH has different
alignment for ELFCLASS32 and ELFCLASS64.
2022-03-20 Mark Wielaard <[email protected]>
* version_xlate.h (elf_cvt_Verdef): Make sure aux_offset and
def_offset don't overflow.
(elf_cvt_Verneed): Make sure aux_offset and need_offset don't
overflow.
2022-03-18 Mark Wielaard <[email protected]>
* version_xlate.h (elf_cvt_Verdef): Check alignment of def_offset
and aux_offset.
(elf_cvt_Verneed): Check alignment of need_offset and aux_offset.
2022-03-17 Mark Wielaard <[email protected]>
* elf_begin.c (read_long_names): Check ar_size starts with a digit.
2022-03-17 Mark Wielaard <[email protected]>
* elf_begin.c (get_shnum): Take offset into account for Shdr
alignment check.
2021-12-19 Mark Wielaard <[email protected]>
* elf_begin.c (file_read_elf): Cast ehdr to uintptr_t before e_shoff
alignment check. Only set shdr state when scncnt is larger than zero.
2021-12-16 Mark Wielaard <[email protected]>
* libelfP.h (NOTE_ALIGN4): And with negative unsigned long.
(NOTE_ALIGN8): Likewise.
2021-12-15 Mark Wielaard <[email protected]>
* elf_begin.c (get_shnum): Use offsetof to get field of unaligned
struct.
2021-09-06 Dmitry V. Levin <[email protected]>
* common.h (allocate_elf): Remove cast of calloc return value.
* elf_newdata.c (elf_newdata): Likewise.
* elf_getscn.c (elf_getscn): Remove casts of calloc return values.
* elf_newscn.c (elf_newscn): Likewise.
* elf32_updatefile.c (__elfw2): Remove casts of malloc return values.
* elf_getdata.c (convert_data): Likewise.
(__libelf_set_rawdata_wrlock): Remove cast of malloc return value.
* elf_begin.c (read_long_names): Remove cast of malloc return value.
* elf_readall.c (__libelf_readall): Likewise.
* elf_getarsym.c (elf_getarsym): Remove casts of malloc and realloc
return values.
2021-07-19 Mark Wielaard <[email protected]>
* elf_strptr.c (validate_str): Check last char is zero first before
calling memrchr on the whole block.
2021-06-09 Andrei Homescu <[email protected]>
* elf_getdata.c: Fix d_align for sections where alignment is larger
than offset.
2020-12-12 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2020-12-16 Dmitry V. Levin <[email protected]>
* libelfP.h (_): Remove.
2020-12-15 Mark Wielaard <[email protected]>
* elf_begin.c (get_shnum): Make sure the full Ehdr is available.
2020-12-12 Dmitry V. Levin <[email protected]>
* common.h: Fix spelling typo in comment.
* gelf.h: Likewise.
* libelf.h: Likewise.
* libelfP.h: Likewise.
* elf32_checksum.c (elfw2): Likewise.
* elf_begin.c (dup_elf, write_file): Likewise.
* elf_compress.c (__libelf_compress): Likewise.
* elf_compress_gnu.c (elf_compress_gnu): Likewise.
2020-12-11 Dmitry V. Levin <[email protected]>
* Makefile.am (GCC_INCLUDE): Remove.
2020-12-09 Dmitry V. Levin <[email protected]>
* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
(libelf_so_SOURCES): Remove.
(CLEANFILES): Add libelf.so.
2020-11-30 Dmitry V. Levin <[email protected]>
* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
2020-11-06 Mark Wielaard <[email protected]>
* elf-knowledge.h (SH_ENTSIZE_HASH): Update comment.
2020-11-01 Mark Wielaard <[email protected]>
* elf_strptr.c (elf_strptr): Check shdr is not NULL.
2020-11-01 Mark Wielaard <[email protected]>
* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Set *dst to zero on
error.
2020-11-01 Mark Wielaard <[email protected]>
* libelfP.h (__libelf_data_type): Take an GElf_Ehdr instead of an
Elf handle.
* elf_getdata.c (__libelf_data_type): Likewise. And check ehdr
directly instead of fetching a new one.
(__libelf_set_rawdata_wrlock): Fetch Ehdr, report an error when that
fails, otherwise call __libelf_data_type.
2020-10-28 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2020-08-28 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2020-08-19 Mark Wielaard <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Fixup the sh_addralign
of an SHF_COMPRESSED section if necessary.
2020-06-04 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2020-05-08 Mark Wielaard <[email protected]>
* elf_strptr.c (elf_strptr): Check shdr is not NULL.
2020-05-08 Mark Wielaard <[email protected]>
* elf_getdata.c (__libelf_set_rawdata_wrlock): Check
__gelf_getehdr_rdlock return value.
2020-04-25 Mark Wielaard <[email protected]>
* elf_compress.c (__libelf_compress): Remove free (out_buf).
2020-03-18 Omar Sandoval <[email protected]>
* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Call
__elf{32,64}_getshdr_rdlock if the shdr is not cached.
2019-03-20 Matthias Maennich <[email protected]>
* elf_compress.c (__libelf_compress): Always call deflate_cleanup
in failure path. Call deflateEnd only once.
(__libelf_decompress): Call inflateEnd only once.
2019-06-18 Mark Wielaard <[email protected]>
* common.h (allocate_elf): Use int64_t instead of off_t for offset.
* elf32_newphdr.c (newphdr): Document why Elf32/64_Word is correct.
* elf32_updatefile.c (fill): Use int64_t instead of off_t for pos.
(updatefile): Define last_offset, shdr_offset and scn_start as
int64_t instead of off_t.
* elf32_updatenull.c: Define Elf32_SizeWord and Elf64_SizeWord.
(updatenull_wrlock): Return int64_t instead of off_t. Define size,
sh_entsize, sh_align and sh_size as SizeWords. Define offset as
int64_t. Cast data->d_off to SizeWord instead of GElf_Word. Drop
size GElf_Word cast. Cast offset to SizeWord instead of GElf_Word
when comparing with sh_size.
* elf_begin.c (get_shnum): Define offset as int64_t instead of
off_t. Document why use GElf_Word is correct.
(file_read_elf): Define offset as int64_t instead of off_t.
(__libelf_read_mmaped_file): Likewise.
(read_unmmaped_file): Likewise.
(read_file): Likewise.
* elf_getaroff.c (elf_getaroff): Return int64_t.
* elf_getbase.c (elf_getbase): Likewise.
* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Define offset as
int64_t instead of off_t.
* elf_update.c (write_file): Return int64_t instead of off_t,
define size as int64_t instead of off_t.
(elf_update): Likewise.
* libelfP.h (struct Elf): Define start_offset, sizestr_offset and
offset as int64_t.
(__libelf_read_mmaped_file): Define offset as int64_t.
(__elf32_updatenull_wrlock): Return int64_t.
(__elf64_updatenull_wrlock): Return int64_t.
2019-05-12 Mark Wielaard <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Mark shdr_flags dirty if
either offset or size changed.
2019-05-01 Mark Wielaard <[email protected]>
* gelf_getnote.c (gelf_getnote): Check n_namesz doesn't overflow
offset.
2019-04-30 Mark Wielaard <[email protected]>
* note_xlate.h (elf_cvt_note): Indicate we only translated the note
header if we ran out of data by updating len, src and dest.
2019-04-01 Mao Han <[email protected]>
* elf.h: Update from glibc.
2019-03-07 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Use posix_memalign instead of
aligned_alloc.
2019-03-06 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Free scns before returning
allocation failure.
2019-02-24 Mark Wielaard <[email protected]>
* gelf_xlate.c (__elf_xfctstof): Remove alias.
* libelfP.h (__elf_xfctstof): Remove definition.
2019-02-24 Mark Wielaard <[email protected]>
* elf32_fsize.c (local_strong_alias): Remove definition.
(msize): Remove alias.
* libelfP.h (__elf32_msize): Remove definition.
(__elf64_msize): Likewise.
2019-02-21 Mark Wielaard <[email protected]>
* common.h (determine_kind): Only accept EV_CURRENT.
* elf32_fsize.c (fsize): Just check version is EV_CURRENT.
Use __libelf_type_size without version dimension.
* elf32_updatefile.c (updatemmap): Define fctp from __elf_xfctstom
without version dimension.
(updatefile): Likewise.
* elf32_updatenull.c (default_ehdr): Check e_version is EV_CURRENT.
(updatenull_wrlock): Check d_version is EV_CURRENT.
(elf32_xlatetof): Likewise. And get recsize without version
dimension from __elf_xfctstom.
(elf32_xlatetom): Likewise.
* elf_begin.c (elf_begin): Check __libelf_version is EV_CURRENT.
* elf_compress.c (__libelf_reset_rawdata): Set d_version to
EV_CURRENT.
* elf_getdata.c (shtype_map): Remove version dimension.
(__libelf_type_aligns): Likewise.
(__libelf_data_type): Use shtype_map without version dimension.
(convert_data): Remove unused version argument. Get fp from
__elf_xfctstom without version dimensions.
(__libelf_set_data_list_rdlock): Call convert_data without version.
* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Call __elfcfctstom
conversion function without version dimensions. Set d_version to
EV_CURRENT.
* elf_newdata.c (elf_newdata): Set d_version to EV_CURRENT.
* elf_version.c (__libelf_version_initialized): Removed.
(__libelf_version): Initialized to EV_NONE.
(elf_version): Always return EV_CURRENT for EV_NONE version.
Only accept (and return) EV_CURRENT as version.
* gelf_fsize.c (__libelf_type_sizes): Remove version dimension.
(gelf_fsize): Only accept EV_CURRENT as version.
Use __libelf_type_sizes without version dimension.
* gelf_xlate.c (__elf_xftstom): Remove version dimensions.
* libelfP.h (__elf_xfctstom): Defined without version dimensions.
(__elf_xfctstof): Likewise.
(__libelf_type_sizes): Define without version dimension.
(elf_typesize): Define using __libelf_type_sizes without version
dimension.
(__libelf_version_initialized): Remove definition.
(__libelf_version): Add definition.
(LIBELF_EV_IDX): Removed define.
(__libelf_type_aligns): Remove version dimension.
* nlist.c (nlist): Call elf_version unconditionally.
2019-02-19 Mark Wielaard <[email protected]>
* elf_compress.c (do_deflate_cleanup): Remove ei_data argument,
check cdatap is not NULL before calling free.
(deflate_cleanup): Add cdata as argument.
(__libelf_compress): Also check whether the d_size is not zero
before converting data. Call deflate_cleanup with an extra
argument depending on whether there is converted data to free.
Always allocate allocate at least one byte for buf_out.
2019-02-14 Mark Wielaard <[email protected]>
* elf_begin.c (read_long_names): Make sure ar_size is properly
terminated. Sanity check len early if we can.
2019-01-18 Mark Wielaard <[email protected]>
* Makefile.am (INSTALL_ELFH): Add elf.h to include_HEADERS when
defined, otherwise (the default) add elf.h to noinst_HEADERS.
2019-01-16 Mark Wielaard <[email protected]>
* note_xlate.h (elf_cvt_note): Check n_namesz and n_descsz don't
overflow note_len into note header.
2018-11-17 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Make sure to call convert
function on a properly aligned destination.
2018-11-16 Mark Wielaard <[email protected]>
* libebl.h (__elf32_msize): Mark with const attribute.
(__elf64_msize): Likewise.
2018-11-13 Mark Wielaard <[email protected]>
* elf_getdata.c (__libelf_set_rawdata_wrlock): Explicitly set the
alignment of SHF_COMPRESSED data to the alignment of ELF_T_CHDR.
* elf_compress.c (elf_compress): After compression set sh_addralign
to the alignment of ELF_T_CHDR.
2018-11-09 Mark Wielaard <[email protected]>
* elf_compress_gnu.c (elf_compress_gnu): Use elf_getdata.
2018-11-12 Mark Wielaard <[email protected]>
* elf-knowledge.c (ELF_NOTE_GNU_BUILD_ATTRIBUTE_PREFIX): New define.
(NT_GNU_BUILD_ATTRIBUTE_{OPEN,FUNC}): Likewise.
(GNU_BUILD_ATTRIBUTE_TYPE_{NUMERIC,STRING,BOOL_TRUE,BOOL_FALSE}):
Likewise.
(GNU_BUILD_ATTRIBUTE_{VERSION,STACK_PROT,RELRO,STACK_SIZE,TOOL,ABI,
PIC,SHORT_ENUM}): Likewise.
2018-11-09 Mark Wielaard <[email protected]>
* elf_compress.c (__libelf_reset_rawdata): Make rawdata change
explicit by calling __libelf_set_data_list.
* elf_getdata.c (convert_data): Don't convert if type is ELF_T_BYTE
even if endianness is different.
2018-10-18 Mark Wielaard <[email protected]>
* libelf.h (Elf_Type): Add ELF_T_NHDR8.
* libelfP.h (__libelf_data_type): Add align argument.
(NOTE_ALIGN): Split into...
(NOTE_ALIGN4): ... and ...
(NOTE_ALIGN8): this.
* elf32_xlatetom.c (xlatetom): Recognize both ELF_T_NHDR and
ELF_T_NHDR8.
* elf_compress.c (elf_compress): Pass zdata_align to
__libelf_data_type.
* elf_compress_gnu.c (elf_compress_gnu): Pass sh_addralign to
__libelf_data_type.
* elf_getdata.c (shtype_map): Add ELF_T_NHDR8.
(__libelf_data_type): Take align as extra argument, use it to
determine Elf_Type.
(__libelf_set_rawdata_wrlock): Recognize ELF_T_NHDR8. Pass align to
__libelf_data_type.
* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_NHDR8.
* gelf_getnote.c (gelf_getnote): Use Elf_Type of Elf_Data to calculate
padding.
* gelf_xlate.c (__elf_xfctstom): Set ELF_T_NHDR to elf_cvt_note4,
add ELF_T_NHDR8.
* note_xlate.h (elf_cvt_note): Take nhdr8 argument and use it to
determine padding.
(elf_cvt_note4): New function.
(elf_cvt_note8): Likewise.
2018-09-13 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Use shnum, not ehdr->e_shnum.
* elf_getscn.c (elf_getscn): Create section zero if it is requested,
but doesn't exist yet.
2018-09-12 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Use memmove, not memcpy.
* elf_update.c (write_file): Try to mremap if file needs to be
extended.
2018-08-18 Mark Wielaard <[email protected]>
* libelf.h (elf_compress_gnu): Add documentation about
interaction between SHF_COMPRESED and elf_compress_gnu.
* elf_compress_gnu.c (elf_compress_gnu): Return error if section
sh_flags has SHF_COMPRESSED set.
2018-07-27 Mark Wielaard <[email protected]>
* libelf.h (elf_getshdrstrndx): Fix documentation.
(elf_getshstrndx): Likewise.
2018-06-19 Mark Wielaard <[email protected]>
* libelfP.h (__libelf_type_align): Remove !ALLOW_UNALIGNED guard.
* elf_getdata.c (__libelf_type_aligns): Likewise.
(convert_data): Remove ALLOW_UNALIGNED check.
* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
2018-06-21 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2018-04-19 Andreas Schwab <[email protected]>
* elf.h: Update from glibc.
2018-02-16 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2018-02-09 Joshua Watt <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Use FALLTHROUGH macro
instead of comment.
* elf_begin.c (read_unmmaped_file): Likewise.
(elf_begin): Likewise.
* elf_cntl.c (elf_cntl): Likewise.
2017-10-04 Mark Wielaard <[email protected]>
* elf_begin.c (file_read_elf): Skip sanity checking e_shoff if scncnt
is zero, we won't use it then.
2017-10-04 Mark Wielaard <[email protected]>
* libelfP.h: Add ELF_E_INVALID_ELF to error values enum.
* elf_error.c (ELF_E_INVALID_ELF_IDX): New define. Use it as value
for ELF_E_INVALID_ELF in msgidx.
* elf_getshdrstrndx.c (elf_getshdrstrndx): Distinquish between pread
failing and not having enough data.
* elf_begin.c (get_shnum): Likewise. Explicitly set libelf errno on
too large value.
(file_read_elf): Make sure to always set libelf errno when returning
NULL. Distinquish between i/o file and elf data errors.
2017-08-18 Ulf Hermann <[email protected]>
* gelf_xlate.c: Use attribute_packed.
2017-04-27 Ulf Hermann <[email protected]>
* libelfP.h: Use attribute_hidden.
2017-04-27 Ulf Hermann <[email protected]>
* Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
2017-08-15 Mark Wielaard <[email protected]>
* elf.h: Update from glibc. Add new powerpc note descriptors.
2017-07-19 Gustavo Romero <[email protected]>
* elf.h: Add known type in notes segment descriptor for HTM SPRs.
2017-02-17 Ulf hermann <[email protected]>
* Makefile.am: Add libelf_so_DEPS, which include libeu.a,
libelf_so_LIBS.
(libelf_so_LDLIBS): Add $(libelf_so_DEPS).
(libelf.so$(EXEEXT): Use $(libelf_so_LIBS), require libelf.map
from the right directory.
2017-04-20 Ulf Hermann <[email protected]>
* libelfP.h: Don't include config.h.
2017-04-20 Ulf Hermann <[email protected]>
* elf_begin.c: Use F_GETFD rather than F_GETFL.
2017-04-20 Ulf Hermann <[email protected]>
* libelf.h: Define macros for various function attributes and use
them.
2017-04-20 Ulf Hermann <[email protected]>
* elf_update.c: Set ELF_F_MMAPPED flag if we mmap from elf_update.
2017-04-19 Mark Wielaard <[email protected]>
* elf_getarsym.c (elf_getarsym): Initialize n to zero.
2017-03-27 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Always update last_positition.
(updatefile): Likewise.
2017-03-24 Mark Wielaard <[email protected]>
* elf_compress.c (__libelf_decompress): Check insane compression
ratios before trying to allocate output buffer.
2016-10-11 Akihiko Odaki <[email protected]>
Mark Wielaard <[email protected]>
* gelf.h (gelf_newehdr): Change return type to void *.
(gelf_newphdr): Likewise.
* gelf_newehdr.c (gelf_newehdr): Likewise.
* gelf_newphdr.c (gelf_newphdr): Likewise.
2016-10-21 Mark Wielaard <[email protected]>
* elf_getdata.c (__libelf_set_rawdata_wrlock): Sanity check
offset and size before trying to malloc and read data.
2016-10-26 Mark Wielaard <[email protected]>
* elf_begin.c (read_file): Always set maxsize when parent == NULL.
2016-10-11 Akihiko Odaki <[email protected]>
* elf_getarsym.c (elf_getarsym): Open code rawmemchr when not
available.
* elf_strptr.c: Include stdbool.h.
(validate_str): New function.
(elf_strptr): Use validate_str instead of memrchr.
2016-10-11 Akihiko Odaki <[email protected]>
* elf32_updatefile.c: Remove sys/param.h include.
* elf32_updatenull.c: Likewise. Add system.h include.
* elf_begin.c: Remove sys/param.h.
* elf_compress: Likewise. Add system.h include.
(MAX): Remove definition.
2016-08-07 Mark Wielaard <[email protected]>
* elf_compress.c (__libelf_reset_rawdata): Check scn->flags and
free rawdata_base when malloced. Set ELF_F_MALLOCED for scn->flags.
* elf_end.c (elf_end): Check scn->flags and free rawdata_base if
malloced.
* libelfP.h (struct Elf_Scn): Document flags ELF_F_MALLOCED usage.
2016-07-06 Mark Wielaard <[email protected]>
* elf-knowledge.h (SH_FLAGS_COMBINE): Removed.
(SH_FLAGS_IMPORTANT): Likewise.
2016-07-06 Mark Wielaard <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Ignore e_type when
updating phdrs.
* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): Only do sanity
checking if phdrs haven't been read in yet.
2016-06-24 John Ogness <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Find first section.
* elf_nextscn.c (elf_nextscn): When scn is NULL start from 0th
section.
2016-06-28 Richard Henderson <[email protected]>
* elf.h: Update from glibc. Add lots of new EM_* definitions.
2016-04-14 Mark Wielaard <[email protected]>
* elf_compress.c (__libelf_compress): Free out_buf if deflateInit
fails.
2016-02-13 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Free scns when out of memory.
2016-01-28 Mark Wielaard <[email protected]>
* elf.h: Update from glibc. Add new i386 and x86_64 relocations.
2016-02-12 Mark Wielaard <[email protected]>
* elf.h: Update from glibc. Add NT_ARM_SYSTEM_CALL.
2016-02-04 Mark Wielaard <[email protected]>
* elf_getdata.c (__libelf_set_rawdata_wrlock): Don't adjust align
for SHT_NOBITS sections.
2016-01-22 Chih-Hung Hsieh <[email protected]>
* elf_compress.c (__libelf_compress): Move nested function
'do_deflate_cleanup' to file scope to compile with clang.
* elf_strptr.c (elf_strptr): Move nested function 'get_zdata'
to file scope to compile with clang.
2016-01-13 Mark Wielaard <[email protected]>
* libelf.h: Check SHF_COMPRESSED is defined. If not define it and the
associated ELF compression types/defines.
2015-11-26 Mark Wielaard <[email protected]>
* elf_compress.c (__libelf_decompress_elf): New function, extracted
from...
(elf_compress): here. Check zdata_base use __libelf_decompress_elf.
* elf_strptr.c (elf_strptr): If SHF_COMPRESSED check, uncompress and
use zdata.
* libelfP.h (struct Elf_Scn): Add zdata_size and zdata_align.
(__libelf_decompress_elf): New internal function definition.
2015-10-21 Mark Wielaard <[email protected]>
* Makefile.am (libelf_a_SOURCES): Add elf_compress.c and
elf_compress_gnu.c.
* elf_compress.c: New file.
* elf_compress_gnu.c: Likewise.
* elf_begin.c (file_read_elf): Make a writable copy of the shdrs
for ELF_C_READ_MMAP.
* elf_end.c (elf_end): Free zdata_base.
* elf_error.c: Add ELF_E_ALREADY_COMPRESSED,
ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
ELF_E_DECOMPRESS_ERROR.
* elf_data.c (__libelf_data_type): New internal function extracted
from convert_data.
(convert_data): Handle SHF_COMPRESSED.
* elf32_updatenull.c (updatenull_wrlock): Check sh_entsize against
uncompressed section data size if SHF_COMPRESSED.
* elf32_getshdr.c (load_shdr_wrlock): Adjust assert to account for
ELF_C_READ_MMAP.
* libelf.h: Define elf_compress and elf_compress_gnu.
* libelf.map (ELFUTILS_1.7): Add elf_compress and elf_compress_gnu.
* libelfP.h: Add ELF_E_ALREADY_COMPRESSED,
ELF_E_UNKNOWN_COMPRESSION_TYPE, ELF_E_COMPRESS_ERROR and
ELF_E_DECOMPRESS_ERROR. Define __libelf_data_type.
(__libelf_compress): New internal function definition.
(__libelf_decompress): Likewise.
(__libelf_reset_rawdata): Likewise.
(__libelf_data_type): Likewise.
(struct Elf_Scn): Add zdata_base.
2015-11-19 Mark Wielaard <[email protected]>
* Makefile.am (libelf_a_SOURCES): Add elf32_getchdr.c,
elf64_getchdr.c and gelf_getchdr.c.
(noinst_HEADERS): Add chdr_xlate.h.
* abstract.h: Define Chdr32 and Chdr64.
* chdr_xlate.h: New file.
* elf32_getchdr.c: New file.
* elf64_getchdr.c: New file.
* elf_error.c: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
and ELF_E_INVALID_SECTION_FLAGS.
* elf_getdata.c (__libelf_set_rawdata_wrlock): Set d_type to
ELF_T_CHDR for SHF_COMPRESSED sections.
* exttypes.h: Add Chdr32 and Chdr64.
* gelf.h (GElf_Chdr): New typedef.
(gelf_getchdr): New function definition.
* gelf_fsize.c (__libelf_type_sizes): Add ELF_T_CHDR.
* gelf_getchdr.c: New file.
* gelf_xlate.c (__elf_xfctstom): Add ELF_T_CHDR cvt_chdr.
* gelf_xlate.h: Add Chdr.
* libelf.h (Elf_Type): Add ELF_T_CHDR.
(elf32_getchdr): New function definition.
(elf64_getchdr): Likewise.
* libelf.map (ELFUTILS_1.7): New sections add elf32_getchdr,
elf64_getchdr and gelf_getchdr.
* libelfP.h: Add ELF_E_NOT_COMPRESSED, ELF_E_INVALID_SECTION_TYPE
and ELF_E_INVALID_SECTION_FLAGS.
2015-10-16 Mark Wielaard <[email protected]>
* Makefile.am (libelf_so_LDLIBS): Add -lz.
2015-10-14 Mark Wielaard <[email protected]>
* elf.h: Update from glibc. Add section compression constants and
structures.
2015-10-20 Jose E. Marchesi <[email protected]>
* elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
Fix the size argument to pread_retry.
2015-10-13 Chih-Hung Hsieh <[email protected]>
* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
function 'fill_mmap' to file scope.
* elf_begin.c (elf_begin): Move nested function 'lock_dup_elf'
to file scope.
2015-10-09 Josh Stone <[email protected]>
* libelf.h: Replace loff_t with int64_t throughout.
2015-10-05 Mark Wielaard <[email protected]>
* elf_update.c (write_file): Only use posix_fallocate when using
mmap. Only report failure when errno is ENOSPC.
2015-10-09 Josh Stone <[email protected]>
* libelfP.h (struct Elf): Replace off64_t with off_t.
* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise.
2015-10-05 Chih-Hung Hsieh <[email protected]>
* elf_getarsym.c (elf_getarsym): Do not use
union of variable length arrays.
2015-10-05 Josh Stone <[email protected]>
* Makefile.am (libelf.so): Add AM_V_CCLD and AM_V_at silencers.
2015-09-24 Jose E. Marchesi <[email protected]>
* Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
relocation overflows in some platforms.
2015-09-29 Mark Wielaard <[email protected]>
* elf32_updatenull.c (default_ehdr): Set e_version when EV_NONE.
(updatenull_wrlock): Always set e_shentsize.
2015-09-23 Mark Wielaard <[email protected]>
* elf32_getehdr.c (getehdr_wrlock): Mark as internal_function.
* elf32_getshdr.c (getshdr_rdlock): Likewise.
(getshdr_wrlock): Likewise.
* elf_error.c (__libelf_seterrno): Likewise.
* elf_getphdrnum.c (__elf_getphdrnum_rdlock): Likewise.
(__elf_getphdrnum_chk_rdlock): Likewise.
* elf_getshdrnum.c (__elf_getphdrnum_rdlock): Likewise.
(__elf_getphdrnum_chk_rdlock): Likewise.
* elf_getshdrnum.c (__elf_getshdrnum_rdlock): Likewise.
* elf_readall.c (__libelf_readall): Likewise.
* gelf_getehdr.c (__gelf_getehdr_rdlock): Likewise.
2015-09-22 Mark Wielaard <[email protected]>
* *.c: Remove old-style function definitions.
2015-06-22 Mark Wielaard <[email protected]>
* dl-hash.h: Update from glibc.
2015-06-18 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatefile): Always free shdr_data and scns
when allocated on failure paths.
2015-06-18 Mark Wielaard <[email protected]>
* nlist.c (nlist): Check symscn shdr exists before use.
2015-06-16 Mark Wielaard <[email protected]>
* elf_update.c (write_file): Always also use ftruncate before
posix_fallocate to make sure file has the right size.
2015-06-04 Mark Wielaard <[email protected]>
* elf_getdata.c (__libelf_type_aligns): Add entries for ELF_T_EHDR,
ELF_T_OFF, ELF_T_PHDR, ELF_T_SHDR, ELF_T_SWORD, ELF_T_XWORD,
ELF_T_SXWORD, ELF_T_GNUHASH, ELF_T_AUXV.
* elf_getdata_rawchunk.c (elf_getdata_rawchunk): Check alignment
of rawdata against requested type.
2015-06-02 Mark Wielaard <[email protected]>
* elf_getdata.c (convert_data): Make sure source data is properly
aligned for type before calling actual conversion function.
2015-06-04 Mark Wielaard <[email protected]>
* elf_begin.c (get_shnum): Check alignment of Shdr, not Ehdr before
direct access.
2015-06-02 Mark Wielaard <[email protected]>
* elf_begin.c (file_read_elf): Split checks for ehdr and shdr
alignment, drop phdr alignment check.
2015-05-31 Mark Wielaard <[email protected]>
* elf32_getshdr.c (load_shdr_wrlock): Allocate shdrs with malloc,
not alloca and free after conversion when a copy needs to be made.
2015-05-31 Mark Wielaard <[email protected]>
* elf32_getphdr.c (getphdr_wrlock): Allocate phdrs with malloc, not
alloca and free after conversion when a copy needs to be made.
2015-05-31 Mark Wielaard <[email protected]>
* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
malloc, not alloca also in !ALLOW_UNALIGNED case.
2015-05-30 Mark Wielaard <[email protected]>
* gelf_xlate.c (elf_cvt_Byte): Only call memmove with non-zero size.
2015-05-30 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Only call mempcpy and update
last_position when d_size is non-zero.
2015-05-17 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatefile): Allocate shdr_data and scns
with malloc, not alloca. Free after writing section headers.
2015-05-16 Mark Wielaard <[email protected]>
* elf32_updatefile.c (updatemmap): Allocate temporary shdr storage
with malloc, not alloca. Free after writing section header.
2015-05-16 Mark Wielaard <[email protected]>
* elf_getarsym.c (elf_getarsym): Allocate temporary file_date with
malloc, not alloca. Call free after out.
2015-05-14 Mark Wielaard <[email protected]>
* elf_update.c (write_file): Use posix_fallocate instead of
ftruncate to extend file if necessary.
2015-05-13 Mark Wielaard <[email protected]>
* elf32_updatenull.c (default_ehdr): If e_phnum is zero then set
e_phoff also to zero.
2015-05-12 Mark Wielaard <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Check that sh_addralign
is a powerof2.
* elf_getdata.c (__libelf_set_rawdata_wrlock): Clamp large d_aligns
to the elf image offset.
2015-05-12 Mark Wielaard <[email protected]>
* elf32_newphdr.c (newphdr): Call __libelf_seterrno with
ELF_E_INVALID_INDEX before failing. Check whether section zero shdr
actually exists if we need to put extended phnum in section zero.
2015-05-08 Mark Wielaard <[email protected]>
* nlist.c (nlist): Call gelf_fsize with EV_CURRENT.
2015-01-03 Mark Wielaard <[email protected]>
* version_xlate.h (elf_cvt_Verdef): Use memmove to copy src to dest.
(elf_cvt_Verneed): Likewise.
2015-03-28 Mark Wielaard <[email protected]>
* elf.h: Update from glibc.
2015-03-23 Mark Wielaard <[email protected]>
* elf32_updatenull.c (updatenull_wrlock): Don't extend size with
SHT_NOBITS sh_offset.
2015-02-18 Mark Wielaard <[email protected]>
* libelfP.h (__libelf_set_data_list_rdlock): Make internal_function.
2015-02-07 Jan Kratochvil <[email protected]>
* elf32_updatenull.c (__elfw2(LIBELFBITS,updatenull_wrlock)): Consider
sh_addralign 0 as 1.
2015-01-22 Mark Wielaard <[email protected]>
* elf_strptr (elf_strptr): Make sure returned string is NUL
terminated.
2015-01-21 Mark Wielaard <[email protected]>
* elf_strptr.c (elf_strptr): Check data_list_rear == NULL instead
of rawdata_base != NULL before using rawdata directly.
2015-01-20 Mark Wielaard <[email protected]>
* libelfP.h (__elf_strptr_internal): New function declaration.
* elf_getdata.c (__libelf_set_data_list_rdlock): New internal
function extracted from...
(__elf_getdata_rdlock): ... here.
* elf_newdata.c (elf_newdata): Check scn->rawdata_base and update
datalist if necessary.
2015-01-20 Mark Wielaard <[email protected]>
* elf_strptr.c (elf_strptr): Call __elf[32|64]_getshdr_rdlock if
necessary.
2014-12-30 Mark Wielaard <[email protected]>
* elf_getphdrnum.c (__elf_getphdrnum_chk_rdlock): New function.
(elf_getphdrnum): Call __elf_getphdrnum_chk_rdlock.
* gelf_getphdr (gelf_getphdr): Call __elf_getphdrnum_chk_rdlock
and always check ndx against phnum.
* libelfP.h (__elf_getphdrnum_chk_rdlock): New internal function.
2014-12-25 Mark Wielaard <[email protected]>
* elf_begin.c (__libelf_next_arhdr_wrlock): ar_size cannot be
negative. Include start_offset in maxsize.
2014-12-28 Alexander Cherepanov <[email protected]>
* elf_begin.c (read_long_names): Don't miss '/' right after
another '/'. Fixes a dir traversal vuln in ar extraction.
2014-12-18 Ulrich Drepper <[email protected]>