- Use a better name for a source file.
- Make the libtest/driver module a regular library that provides a
main() to link against.
- Remove a bogus dependency line introduced in [r3668].
Add an explicit count of the test functions that had
been grouped into a test case.
While here, improve a few comments, wrap long lines,
change a symbol naming prefix, trim a header and
rename it to reflect its intended use.
Add .cirrus.yml Cirrus-CI config file
Cirrus-CI is a hosted continuous integration service that supports
Linux, Windows, macOS, and FreeBSD. It will automatically build and
execute tests upon commit - it currently integrates only with GitHub,
although other repo hosting providers will likely be added later. For
now we expect to set up an automatic SourceForge->GitHub mirror.
readelf: avoid printing directory in front of absolute path
Fix CU: output of the --debug-dump=decodedline, the problem there
is that both file name and current directory is recorded, however
file name sometimes already contains absolute path. In which case
prefixing it with directory name results in an invalid pathname.
Only prepend directory name if the file name does not start with '/'.
Submitted by: Maxim Sobolev <sobomax at FreeBSD.org>
Obtained from: FreeBSD r340745
elfcopy: avoid stripping relocations from static binaries
elfcopy contains logic to filter individual relocations in STRIP_ALL
mode, but this is not quite valid: relocations emitted by the linker
are required, unless they apply to an entire section being removed
(which is handled by other logic in elfcopy). This logic resulted in
broken output when stripping a statically linked binary that contains
relocations (as may happen with ifunc use, for example).
Even though stripping required relocations produces output that is
arguably broken some things rely on it - for exmaple, GCC's build
process strips objects and compares the results of two build stages,
to ensure thare are no unexpected changes. These stripped objects are
otherwise not useful; they cannot be linked into a working binary.
Change filter_reloc() to omit relocations referencing removed symbols,
while retaining relocations with no symbol reference, and retain the
entire relocation section if it references the dynamic symbol table.
This allows us to strip statically linked binaries while retaining the
existing behaviour of stripping objects into relocationless output.
Obtained from: FreeBSD r339451
elfcopy: avoid filter_reloc uninitialized variable for rela
Previously we accessed rel.r_info for both rel and rela relocations,
and it was unitialized in the latter case. Note that filter_reloc is
likely to be removed (see FreeBSD PR232176) but we might as well fix
this bug in any case.