Do not use relative include paths in library files.
Rely on include dirs being set up correctly. Setup libdw AM_CPPFLAGS
to include libebl directory. In libdwfl note that debuginfod.h is a
generated file in the builddir. Only include it in the one file
debuginfod-client.c that really needs it.
Signed-off-by: Mark Wielaard <email address hidden>
libdwfl: Read no more than required in dwfl_segment_report_module
Since read_portion and the standard dwfl_elf_phdr_memory_callback
functions make sure to read at least minread bytes there is no need
for dwfl_segment_report_module to check and adjust the data to the
actual buffer size read. Reading beyond the end of the expected data
size (if the buffer read is much larger) actually causes issues when
passing the data to elfXX_xlatetom() because it is possible that
src->d_size is not a multiple of recsize (for ELF_T_DYN, recsize is 16
while the minimum required alignment is 8), causing elfXX_xlatetom()
to return ELF_E_INVALID_DATA.
Signed-off-by: Gavin Li <email address hidden>
Signed-off-by: Mark Wielaard <email address hidden>
* elfcompress.c (T_UNSET): Remove and use ch_type.
(T_DECOMPRESS): Likewise.
(T_COMPRESS_ZLIB): Likewise.
(T_COMPRESS_GNU): Likewise.
(enum ch_type): New.
(parse_opt): Parse to new ch_type.
(compress_section): Change gnu and compress arguments
to schtype (source compression) and dchtype (destination
compression).
(process_file): Use new enum type and adjusted compress_section.