Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use getopts instead of getopt(1) | 2019-05-27 | 1 | -12/+9 | |
| | | | | | getopts is a standard shell builtin (POSIX) and lets you handle whitespace in parameters. ok mpi@ sunil@ | ||||
* | Using getopt(1) is more idiomatic and consistent with other scripts. | 2019-02-18 | 1 | -20/+20 | |
| | | | | Ok mpi@ | ||||
* | Fix in-place stripping by using correct form of parameter substitution. | 2019-02-18 | 1 | -3/+3 | |
| | | | | Ok mpi@ | ||||
* | add unveil(2) to ctfconv(1) | 2018-08-08 | 1 | -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@ | ||||
* | Consider integer/float size during base type comparisons. | 2018-01-31 | 1 | -1/+6 | |
| | | | | | | Regression introduced when I added support for merging forward declarations with their corresponding types because they do not have a size. | ||||
* | Verify that every section header lies within the mapped file. | 2017-11-14 | 1 | -16/+38 | |
| | | | | Pointed out by Mark Johnston, Markj@FreeBSD | ||||
* | Use the symtab's sh_link to get the string table section. | 2017-11-06 | 2 | -15/+27 | |
| | | | | | | | | | | 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. | 2017-11-03 | 1 | -2/+6 | |
| | | | | From Mark Johnston, markj@FreeBSD | ||||
* | Fix a format string warning in dump_type(). | 2017-11-03 | 1 | -2/+2 | |
| | | | | From Mark Johnston, markj@FreeBSD | ||||
* | Merge type forward declarations with real ones as soon as they are found. | 2017-10-31 | 2 | -14/+45 | |
| | |||||
* | Document the use of a rbtree for resolving types inside a single CU. | 2017-10-28 | 1 | -6/+12 | |
| | | | | No functional changes. | ||||
* | Define nitems() locally and stop including <sys/param.h> | 2017-10-28 | 1 | -2/+6 | |
| | |||||
* | Use <elf.h> rather than <sys/exec_elf.h>. | 2017-10-27 | 2 | -4/+4 | |
| | | | | The former is more portable. | ||||
* | add missing HISTORY; based on CVS logs and release announcements | 2017-10-17 | 1 | -2/+9 | |
| | |||||
* | Add some more boundary checks and prevent an attempt to divide by zero | 2017-09-30 | 1 | -1/+17 | |
| | | | | | to resolve some additional crashes found by afl. ok mpi@ deraadt@ | ||||
* | Check that the end of sections do not exceed the filesize for both | 2017-09-29 | 2 | -13/+18 | |
| | | | | | | | 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. | 2017-09-29 | 1 | -13/+34 | |
| | | | | | | Based on a diff from jsg@. Found independently by jsg@ with afl and markj@FreeBSD with a port. | ||||
* | Unserstand DW_OP_bregN locations. | 2017-09-27 | 1 | -1/+10 | |
| | | | | Sync with readdwarf(1). | ||||
* | Ignore file offset values in section headers that exceed the length of | 2017-09-26 | 2 | -8/+11 | |
| | | | | | | the file. Avoids a crash found with afl. ok mpi@ | ||||
* | Return the correct error value in generate(). | 2017-09-26 | 1 | -3/+3 | |
| | | | | From Mark Johnston, markj@FreeBSD | ||||
* | Handle parse_base() returning NULL for DW_TAG_base_type to avoid | 2017-09-24 | 1 | -1/+3 | |
| | | | | | attemping to insert a NULL iterator leading to a NULL deref crash. Found with afl. ok mpi@ | ||||
* | Ignore DW_FORM_strp with size larger than elf section buffer | 2017-09-24 | 1 | -2/+6 | |
| | | | | | fixes accessing memory out of bounds that led to a segfault. Found with afl. ok mpi@ | ||||
* | fix fd leaks in error paths | 2017-09-19 | 1 | -1/+3 | |
| | | | | ok mpi@ | ||||
* | Fix typo in comment; ok mpi@ | 2017-09-04 | 1 | -2/+2 | |
| | |||||
* | quarterly rescan of the tree: remove unneccessary sys/param.h, and | 2017-08-29 | 4 | -9/+8 | |
| | | | | annotate the ones which are needed. | ||||
* | spelling/grammar fixes; | 2017-08-28 | 1 | -3/+3 | |
| | |||||
* | proper fix for previous and add missing quotes | 2017-08-15 | 1 | -6/+6 | |
| | | | | | from tb@ ok visa@ mpi@ | ||||
* | simplify LABEL extraction; from tb@ | 2017-08-14 | 1 | -2/+2 | |
| | |||||
* | Fix arguments that are passed to strip(1). In particular, | 2017-08-13 | 1 | -2/+2 | |
| | | | | | | $INFILE should not appear twice. OK mpi@, jasper@ | ||||
* | ouch - failed to spot typo in previous too, even though my spell checker | 2017-08-12 | 1 | -2/+2 | |
| | | | | was doing one! | ||||
* | zap trailing whitespace (sorry - failed to spot in previous); | 2017-08-12 | 1 | -2/+2 | |
| | |||||
* | make this properly portable: | 2017-08-12 | 1 | -6/+6 | |
| | | | | | | | | - keep track of the argument inside the for loop to determine INFILE - replace the builtin [[ with [ and adjust the tests - use echo instead of the print builtin from tb@ | ||||
* | tweak usage | 2017-08-12 | 2 | -8/+8 | |
| | | | | prompted by and ok jmc@ | ||||
* | fallback to strip(1) in case ctfconv(1) couldn't handle the file (i.e. when | 2017-08-12 | 1 | -12/+25 | |
| | | | | | | | | the input file lacks useful debug sections). adjust option handling accordingly to pass any flags not handled by ctfstrip(1) down to strip(1). help and ok mpi@ tb@ | ||||
* | pledge ctfconv | 2017-08-11 | 1 | -7/+16 | |
| | | | | feedback/ok mpi@ tb@ | ||||
* | make 'dump' mutually exclusive with writing out the data, to ease pleding | 2017-08-11 | 2 | -6/+12 | |
| | | | | ok mpi@ | ||||
* | Fix typo in SEE ALSO section. | 2017-08-11 | 1 | -2/+2 | |
| | | | | ok mpi@, jmc@ | ||||
* | Fix nested declaration inside union or struct. | 2017-08-11 | 2 | -3/+13 | |
| | |||||
* | tweak previous; | 2017-08-11 | 2 | -8/+8 | |
| | |||||
* | Do not insert random name for anonymous member. | 2017-08-11 | 4 | -15/+24 | |
| | |||||
* | - use mktemp to provide the tempfile name and clean it up properly | 2017-08-11 | 1 | -6/+12 | |
| | | | | | | - set strict posix mode ok mpi@ | ||||
* | add rcs ids | 2017-08-11 | 14 | -0/+26 | |
| | |||||
* | CVS Id and license. | 2017-08-11 | 1 | -0/+16 | |
| | |||||
* | Import a tool for generating CTF data section (SUNW_ctf) based on DWARF | 2017-08-11 | 18 | -0/+5055 | |
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@ |