Page MenuHomeFreeBSD

elfcopy: include extension but replace . when converting from binary
ClosedPublic

Authored by emaste on Dec 9 2015, 5:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 5 2024, 6:21 PM
Unknown Object (File)
Jan 5 2024, 6:21 PM
Unknown Object (File)
Dec 27 2023, 9:01 PM
Unknown Object (File)
Dec 24 2023, 12:39 AM
Unknown Object (File)
Dec 23 2023, 10:25 AM
Unknown Object (File)
Nov 15 2023, 5:15 AM
Unknown Object (File)
Oct 4 2023, 2:59 PM
Unknown Object (File)
Aug 26 2023, 8:31 AM
Subscribers
None

Details

Summary

The change in rS291958 was not consistent with GNU objcopy. The start/end/size symbols created for ELF objects converted from binary need to include the full filename including the extension, but with periods replaced with underscores.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste retitled this revision from to elfcopy: include extension but replace . when converting from binary.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: imp.

readelf -s shows the following for a fuzz.txt file converted to ELF:

Symbol table '.symtab' contains 5 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 
     2: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    1 _binary_fuzz_txt_start
     3: 00000000000011d0     0 NOTYPE  GLOBAL DEFAULT    1 _binary_fuzz_txt_end
     4: 00000000000011d0     0 NOTYPE  GLOBAL DEFAULT  ABS _binary_fuzz_txt_size

Check for failure from strdup

imp edited edge metadata.
This revision is now accepted and ready to land.Dec 9 2015, 6:37 PM
This revision was automatically updated to reflect the committed changes.