summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libelf: Only include features.h on linux.staging/lineage-15.1staging/lineage-15.0_rebase-android-8.0.0_r23lineage-15.1lineage-15.0Adnan Begovic2017-08-241-0/+2
| | | | Change-Id: I5429f63166f8e7da6b2099157fefc3f590d97719
* Merge \\\\"Convert libelf from Android.mk to Android.bp\\\\" am: adc7fa7b8e ↵Colin Cross2016-07-144-205/+178
|\ | | | | | | | | | | | | | | am: 7ece9f0c0f am: f7d84e6703 am: 2ed2550b85 Change-Id: I01bb29357af82c325f18f8d56c9106bd2e5d9621
| * Merge \\\"Convert libelf from Android.mk to Android.bp\\\" am: adc7fa7b8e ↵Colin Cross2016-07-144-205/+178
| |\ | | | | | | | | | | | | | | | | | | | | | am: 7ece9f0c0f am: f7d84e6703 Change-Id: I2a8eae7807332bc449e23976051930e6b1f769e6
| | * Merge \\"Convert libelf from Android.mk to Android.bp\\" am: adc7fa7b8eColin Cross2016-07-144-205/+178
| | |\ | | | | | | | | | | | | | | | | | | | | am: 7ece9f0c0f Change-Id: I6e3a34b756475556c76f896b3a375a619267a74a
| | | * Merge \"Convert libelf from Android.mk to Android.bp\"Colin Cross2016-07-144-205/+178
| | |/| | | | | | | | | | | | | | | | | | | | | am: adc7fa7b8e Change-Id: Id33ffd978656745723ffd7640c8b3a6638d91c3a
| | | * Merge "Convert libelf from Android.mk to Android.bp"Treehugger Robot2016-07-144-205/+178
| | | |\
| | | | * Convert libelf from Android.mk to Android.bpColin Cross2016-07-134-205/+178
| | | |/ | | | | | | | | | | | | Change-Id: I4b3859757c67e4a505c7e96b27907db47e44d106
* | | | Merge "Stop build of unused libraries." am: 9ed309a am: 8d1af01 am: e096759Chih-hung Hsieh2016-04-204-583/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: ea8b364 * commit 'ea8b3640dfeb709ee43adc476e37ec7c5deacf0f': Stop build of unused libraries. Change-Id: I8138d653292fe06739695b0337f7f31bf1fad190
| * | | Merge "Stop build of unused libraries." am: 9ed309a am: 8d1af01Chih-Hung Hsieh2016-04-204-583/+0
|/| | | | |/ / | | | | | | | | | | | | | | | | | | | | | am: e096759 * commit 'e0967593ee18fb41658d6b187d8cd31044705e3a': Stop build of unused libraries. Change-Id: I5578604aa081b103d98ed342ca616975e81bccc6
| * | Merge "Stop build of unused libraries." am: 9ed309aChih-hung Hsieh2016-04-204-583/+0
|/| | | | | | | | | | | | | | | | | | | | | | | | | | am: 8d1af01 * commit '8d1af015e3b3a36146f415afd3101040584433f6': Stop build of unused libraries. Change-Id: I533b8f4172b80195042ce25f43d2cac611aa051f
| * | Merge "Stop build of unused libraries."Chih-Hung Hsieh2016-04-204-583/+0
|/| | | |/ | | | | | | | | | | | | | | am: 9ed309a * commit '9ed309a54518bcd5c3648cb6e868b98cf4284a70': Stop build of unused libraries. Change-Id: I25025a23711dfabb596113af0cbdcc99d3142072
| * Merge "Stop build of unused libraries."Chih-hung Hsieh2016-04-204-583/+0
|/|
| * Stop build of unused libraries.Chih-Hung Hsieh2016-04-194-583/+0
|/ | | | | | | Only libelf.a is needed by Android now. Bug: 17281788 Change-Id: I4ae340884c8d19a42bece72f31edb59c193746b1
* Merge "Revert "Disable clang for arm64 where local __thread is used.""Stephen Hines2016-02-253-9/+0
|\
| * Revert "Disable clang for arm64 where local __thread is used."Stephen Hines2016-02-243-9/+0
|/ | | | | | | | Bug: http://b/25642296 This reverts commit e223eb95c4f3df36a7c24c3b9a4dfdeec06ac15d. Change-Id: I727eefee8e4edb8d85528999698b82b14855d615
* Merge "Merge upstream 0.165 SHA '203f0a3'"Chih-hung Hsieh2016-01-25100-4615/+11024
|\
| * Merge upstream 0.165 SHA '203f0a3'Chih-Hung Hsieh2016-01-25100-4615/+11024
|/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git merge 203f0a3 * See all upstream changes since the previous merge in branch aosp/upstream-master: git diff 9d1e236..203f0a3 * Android relevant upstream changes: * Version number changed from 0.164 to 0.165 * libelf now depends on zlib * Changed version number in generated files: version.h, config.h * No change to generated files: libdw/known-dwarf.h * Updated libelf/Android.mk: * added new source files: gelf_getchdr.c elf{32,64}_getchdr.c elf_compress.c * added LOCAL_STATIC_LIBRARIES := libz Change-Id: Ieb306d84ffcaf680ad6e74da28fcc8efbf00592a
| * Move nested functions in elf_compress.c and elf_strptr.c.Chih-Hung Hsieh2016-01-233-26/+39
| | | | | | | | | | | | | | * elf_compress.c (__libelf_compress): do_deflate_cleanup * elf_strptr.c (elf_strptr): get_zdata Signed-off-by: Chih-Hung Hsieh <chh@google.com>
| * tests: Skip dwfl-bug-fd-leak test if dwfl_linux_proc_report is unsupported.Mark Wielaard2016-01-182-0/+14
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * elflint: Recognize ELFOSABI_FREEBSD which Debian kFreeBSD uses.Mark Wielaard2016-01-182-2/+8
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * tests: Guard linux specific header includes with ifdef __linux__.Mark Wielaard2016-01-182-0/+6
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * configure: clarify zlib error messageMike Frysinger2016-01-141-1/+1
| | | | | | | | | | | | Also drop the spurious quotes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * gitignore: updateMike Frysinger2016-01-141-0/+3
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * libelf: Add ELF compression types and defines to libelf.h for older glibc.Mark Wielaard2016-01-145-2/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | Older glibc elf.h might not define the new ELF compression defines and types. If not just define them in libelf.h directly to make the libelf headers work on older glibc systems. Also include a testcase to check the libelf headers build against the system elf.h. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810885 Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * Regenerate .po files.Mark Wielaard2016-01-116-60/+64
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libebl: Fix missing brackets around if statement body.Mark Wielaard2016-01-092-180/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC6 [will have] a nice new warning that showed a real bug: elfutils/libebl/eblobjnote.c: In function ‘ebl_object_note’: elfutils/libebl/eblobjnote.c:135:5: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] switch (type) ^~~~~~ elfutils/libebl/eblobjnote.c:45:3: note: ...this ‘if’ clause, but it is not if (! ebl->object_note (name, type, descsz, desc)) ^~ And indeed, it should have been under the if, but wasn't because of missing brackets. Added brackets (and reindent). Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * tests: Fix parentheses in elfputzdata strncmp test.Mark Wielaard2016-01-082-1/+5
| | | | | | | | | | | | We were checking strlen () == 0 instead of strncmp () == 0. Oops. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * Fix build on 32bit systems.Mark Wielaard2016-01-085-3/+12
| | | | | | | | | | | | size_t has a different size on 32 and 64 bit systems. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * Prepare 0.165 release.Mark Wielaard2016-01-0811-2967/+3330
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * Simplify code and build now that zlib support is no longer optional.Mark Wielaard2016-01-086-25/+20
| | | | | | | | | | | | | | Now that we always require zlib support we don't need to conditionally build or compile code that depends on it. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * Updated Polish translationPiotr Drąg2016-01-081-723/+824
| | | | | | | | Signed-off-by: Piotr Drąg <piotrdrag@gmail.com>
| * Updated Polish translationPiotr Drąg2016-01-071-659/+724
| | | | | | | | Signed-off-by: Piotr Drąg <piotrdrag@gmail.com>
| * elfcompress: New utility.Mark Wielaard2016-01-066-3/+1440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: elfcompress [OPTION...] FILE... Compress or decompress sections in an ELF file. -f, --force Force compression of section even if it would become larger -n, --name=SECTION SECTION name to (de)compress, SECTION is an extended wildcard pattern (defaults to '.?(z)debug*') -o, --output=FILE Place (de)compressed output into FILE -p, --permissive Relax a few rules to handle slightly broken ELF files -q, --quiet Be silent when a section cannot be compressed -t, --type=TYPE What type of compression to apply. TYPE can be 'none' (decompress), 'zlib' (ELF ZLIB compression, the default, 'zlib-gabi' is an alias) or 'zlib-gnu' (.zdebug GNU style compression, 'gnu' is an alias) -v, --verbose Print a message for each section being (de)compressed -?, --help Give this help list --usage Give a short usage message -V, --version Print program version Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * elflint: Recognize and check SHF_COMPRESSED section flag.Mark Wielaard2016-01-062-10/+43
| | | | | | | | | | | | | | | | SHF_COMPRESSED is a valid section flag, it can optionally be on any special section, but it cannot be used on NOBITS sections or together with SHF_ALLOC. A section that has SHF_COMPRESSED set must have a valid Chdr. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libelf: Make elf_strptr index correctly into compressed section data.Mark Wielaard2016-01-0610-59/+445
| | | | | | | | | | | | | | | | | | elf_strptr indexes into the section data. This is defined as index into the uncompressed data of the section. If the section is compressed make sure the uncompressed data is available, but don't really decompress the section header (elf_getdata will still return compressed data). Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * readelf: Handle compressed sections and extend -z to cover -x and -p.Mark Wielaard2016-01-0610-23/+609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When printing a (non-string, non-data) section use uncompressed data when possible. For dumping hex and string sections (-x and -p) -z will dump the uncompressed data (otherwise the compressed data is dumped). -z, --decompress Show compression information for compressed sections (when used with -S); decompress section before dumping data (when used with -p or -x) Includes test cases for ET_REL files using compressed relocation (target) debug sections to test libdwfl transparent uncompression of sections. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libdwfl: Use elf_compress[_gnu] to decompress string, symbol and reloc data.Mark Wielaard2016-01-065-32/+201
| | | | | | | | | | | | | | | | | | This makes usage of the libdwfl symbol functions work out of the box even when some sections (string, symbol or xndx) are compressed. For ET_REL files this makes relocations just work by making sure the target section is decompressed first before relocations are applied. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libdw: Use elf_compress[_gnu] to uncompress debug section data.Mark Wielaard2016-01-064-137/+63
| | | | | | | | | | | | | | | | libdw used its own code for decompressing GNU style .zdebug sections. Using elf_compress and elf_compress_gnu instead makes it possible to transparently use either GNU style or ELF style compressed data. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libelf: Add elf_compress and elf_compress_gnu.Mark Wielaard2016-01-0620-26/+1822
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * readelf: Add -z,--decompress option.Mark Wielaard2016-01-065-4/+281
| | | | | | | | | | | | | | -z, --decompress Show compression information for compressed sections (when used with -S). Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libelf: Add elf32_getchdr, elf64_getchdr and gelf_getchdr.Mark Wielaard2016-01-0626-18/+676
| | | | | | | | | | | | | | | | | | Elf_Data of a compressed section has type ELF_T_CHDR. This type can be xlated to the file or memory representation. This will make sure the Chdr is in the correct endianess. The compressed data following the Chdr isn't translated. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * libdwelf: Add dwelf_scn_gnu_compressed_size.Mark Wielaard2016-01-0614-6/+334
| | | | | | | | | | | | Helper function to get the size of a GNU compressed zdebug section. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * config: Add libelf and libdw pkg-config files.Mark Wielaard2016-01-057-3/+68
| | | | | | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * elflint: Add _edata and _end to the list of possibly dangling gnuld symbols.Mark Wielaard2016-01-052-1/+10
| | | | | | | | | | | | | | | | | | | | gnuld might keep dangling/unused symbols around (see sourceware PR13621). Add _edata (end of initialized data address) and _end (end of uninitialized data address) to that list. They might have been added by gnuld even if there is no such [un]initialized data. Also add the double underscore variants which are used on some architectures. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * tests: elfstrmerge warn about STT_SECTION symbol for shstrhndx.Mark Wielaard2016-01-054-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Old linkers might have created an STT_SECTION symbol for the section header string table section, which isn't actually used. For now just warn about such symbols. If such a symbol would actually really be used (but why?) then we would have to handle it by removing it and rewriting the symbol table. This is a testsuite only change, but includes an extra test with files that have such STT_SECTION symbols to make sure it will be handled in case we "upgrade" the elfstrmerge test to a real utility. Signed-off-by: Mark Wielaard <mjw@redhat.com>
| * Make make more silent.Mark Wielaard2016-01-052-1/+9
| | | | | | | | | | | | | | Silent rules already are the default, but automake and make both still tell which directory is being entered/build. Disable printing from make. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* | Merge "Merge upstream SHA '9d1e236'"Chih-hung Hsieh2016-01-0551-578/+1407
|\ \
| * | Merge upstream SHA '9d1e236'Chih-Hung Hsieh2016-01-0451-578/+1407
|/| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git merge 9d1e236 * See all upstream changes since the previous merge in branch aosp/upstream-master: git diff b47fb23..9d1e236 * Android relevant upstream changes: Move nested functions to file scope to compile with clang/llvm: libdw/dwarf_entry_breakpoints.c libdw/libdw_visit_scopes.c libdwfl/core-file.c libdwfl/dwfl_module_addrsym.c libdwfl/dwfl_module_getdwarf.c libdwfl/link_map.c libdwfl/linux-proc-maps.c * Other upstream changes: backends: sparc: support for live backtraces elfcmp: Fix leaking Ebl handles. libdw: Don't leak fake_loc_cu. libdw: Don't leak duplicate FDEs. libdw: Don't use a FDE if it doesn't actually cover a real code range. libdw: Make sure Ebl is always freed from cfi frame cache. libdwfl: Don't leak core Elf and core file descriptor from argp-std. libdwfl: Fix memory leak in link_map.c dwfl_link_map_report. libdwfl: make the unwinder aware of the backend defined ra_offset. libebl: new backend attribute ra_offset. nm: Don't leak duplicate Dwarf local names. nm: If the file is ET_REL and we need Dwarf use libdwfl to get it relocated. tests: Fix some memory leaks in testcases. tests: Use valgrind --leak-check=full. unstrip: Don't leak new section data. * No changes to the following generated files: version.h, config.h, libdw/known-dwarf.h * Post merge change: Enable clang compilation in the libdw directory. Change-Id: Ifa9e60b1d5ab1c70da69410509cc9f3abdf58661
| * Move nested functions in linux-proc-maps.c to file scope.Chih-Hung Hsieh2016-01-032-14/+22
| | | | | | | | | | | | * Move nested function 'report' to file scope to compile with clang. Signed-off-by: Chih-Hung Hsieh <chh@google.com>
| * Move nested functions in core-file.c to file scope.Chih-Hung Hsieh2016-01-032-42/+59
| | | | | | | | | | | | * Move nested functions 'fail', 'update_end', and 'more' to file scope. Signed-off-by: Chih-Hung Hsieh <chh@google.com>