summaryrefslogtreecommitdiffstats
path: root/usr.bin/ctfconv/ctfconv.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add unveil(2) to ctfconv(1)mestre2018-08-081-4/+13
| | | | | | | | | | | | Once we know what the input file is, usually /bsd.gdb, we can unveil it in read mode. If we also define as argument an output file we can additionally unveil that one with write/create permissions. We don't need to care about calling unveil(NULL, NULL) since we can call pledge(2) and reduce the permissions down the road depending on the code path. "reads OK" jasper@, "put it in if works" mpi@ prodded by deraadt@
* Use the symtab's sh_link to get the string table section.mpi2017-11-061-9/+5
| | | | | | | | | | This is technically more correct than looking for ".strtab" and allows us to get rid of unportable ELF_STRTAB. We can also get rid of the hack for some incorrect ELF files since we no longer try to apply relocations for the string table. From Mark Johnston, markj@FreeBSD
* Make dump_itype() dump enum members.mpi2017-11-031-2/+6
| | | | From Mark Johnston, markj@FreeBSD
* Fix a format string warning in dump_type().mpi2017-11-031-2/+2
| | | | From Mark Johnston, markj@FreeBSD
* Use <elf.h> rather than <sys/exec_elf.h>.mpi2017-10-271-2/+2
| | | | The former is more portable.
* Check that the end of sections do not exceed the filesize for bothjsg2017-09-291-3/+3
| | | | | | | symtab and sections. Corrects behaviour that led to crashes found via afl. ok mpi@
* Do not segfault when the string table is invalid or not present.mpi2017-09-291-13/+34
| | | | | | Based on a diff from jsg@. Found independently by jsg@ with afl and markj@FreeBSD with a port.
* Ignore file offset values in section headers that exceed the length ofjsg2017-09-261-6/+6
| | | | | | the file. Avoids a crash found with afl. ok mpi@
* fix fd leaks in error pathsjsg2017-09-191-1/+3
| | | | ok mpi@
* quarterly rescan of the tree: remove unneccessary sys/param.h, andderaadt2017-08-291-2/+1
| | | | annotate the ones which are needed.
* tweak usagejasper2017-08-121-3/+2
| | | | prompted by and ok jmc@
* pledge ctfconvjasper2017-08-111-7/+16
| | | | feedback/ok mpi@ tb@
* make 'dump' mutually exclusive with writing out the data, to ease pledingjasper2017-08-111-4/+9
| | | | ok mpi@
* Fix nested declaration inside union or struct.mpi2017-08-111-2/+2
|
* Do not insert random name for anonymous member.mpi2017-08-111-2/+2
|
* add rcs idsjasper2017-08-111-0/+2
|
* Import a tool for generating CTF data section (SUNW_ctf) based on DWARFmpi2017-08-111-0/+452
information. ctfconv(1) support multiple CUs in order to work on binaries. ctfstrip(1) works like strip(1) but also insert a .SUNW_ctf section inside a binary. ok deraadt@, kettenis@, jasper@