mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-20 23:45:11 -04:00
5f9fab9efb042d803fcd2546f29613493f55d666
When writing out data that needs to be converted we have to make sure the conversion function is called on correctly aligned buffers. When using mmap this might mean we have to convert into a temporarily buffer if the user wants to write out the section at a location that is not correctly aligned for the section type. Older gas would generate misaligned ELF notes for the .version directive. When copying over such notes using mmap from files with a different endianness using mmap we would get the alignment of the conversion destination wrong. The new testcase would fail with configure --enable-sanitize-undefined on little endian systems. The GCC undefinited sanitizer caught a similar issue with testfile1 on big endian systems. gelf_xlate.h:47:1: runtime error: member access within misaligned address 0x7f8145d770d5 for type 'struct Elf32_Nhdr', which requires 4 byte alignment Signed-off-by: Mark Wielaard <mark@klomp.org>
The elfutils project provides libraries and tools for ELF files and DWARF data. The project home is http://elfutils.org/ Releases are published at ftp://sourceware.org/pub/elfutils/ Which can also be found at https://sourceware.org/elfutils/ftp/ To build a release do: ./configure && make && make check Please check the configure summary to make sure all recommended features are enabled. There should be no failures after make check. Please reports bugs at https://sourceware.org/bugzilla/ The current elfutils source code can be checked out with git clone git://sourceware.org/git/elfutils.git To build a git checkout do: autoreconf -i -f && \ ./configure --enable-maintainer-mode && \ make && make check The developer mailinglist to send patches to is elfutils-devel@sourceware.org. https://sourceware.org/ml/elfutils-devel/ To subscribe send an email to elfutils-devel-subscribe@sourceware.org Or use the form at https://sourceware.org/lists.html#ml-requestor See the CONTRIBUTING file for how to propose patches to the code. See the NOTES files for some design decisions and notes.
Description
Languages
C
70.8%
Shell
22.6%
C++
3.3%
Makefile
1.4%
M4
1%
Other
0.8%