summaryrefslogtreecommitdiffstats
path: root/libdw/memory-access.h
Commit message (Collapse)AuthorAgeFilesLines
* Make sure packed structs follow the gcc memory layoutUlf Hermann2017-05-021-1/+1
| | | | | | | | On windows gcc by default generates code that follows the MSVC layout. We don't want that as it adds extra padding. Change-Id: I92efe5da2a2ad818783707ee96a9b8e0eb606dbd Reviewed-by: Christian Kandeler <[email protected]>
* libdw: Undefined behavior in get_sleb128_step.Mark Wielaard2015-04-281-4/+19
| | | | | | | | | | gcc -fsanitize=undefined pointed out that for too big sleb128 values we could shift into the sign bit. So for sleb128 values that have to fit in a (signed) int64_t variable reduce the max number of steps by one. https://bugzilla.redhat.com/show_bug.cgi?id=1170810#c29 Signed-off-by: Mark Wielaard <[email protected]>
* libdw: Unroll the first get_sleb128 step to help the compiler optimize.Mark Wielaard2014-12-171-3/+6
| | | | | | | The common case is a single-byte. So no extra (max len) calculation is necessary then. Signed-off-by: Mark Wielaard <[email protected]>
* libdw: pre-compute leb128 loop limitsJosh Stone2014-12-171-2/+15
| | | | Signed-off-by: Josh Stone <[email protected]>
* libdw: Add get_uleb128 and get_sleb128 bounds checking.Mark Wielaard2014-12-171-6/+7
| | | | | | | | | | | Both get_uleb128 and get_sleb128 now take an end pointer to prevent reading too much data. Adjust all callers to provide the end pointer. There are still two exceptions. "Raw" dwarf_getabbrevattr and read_encoded_valued don't have a end pointer associated yet. They will have to be provided in the future. Signed-off-by: Mark Wielaard <[email protected]>
* Rename read_ubyte_unaligned_inc to read_addr_unaligned_incPetr Machata2014-09-121-20/+4
| | | | | | | | | | | | | | - The behavior of this function has been changed to read only address-sized quantities, i.e. the size of 2 is no longer allowed. (Size of 1 never was.) The two outstanding uses, both in readelf.c, which actually do use this call to read address-sized units, were updated, rejecting fields that indicate weird address sizes. - The three related calls, read_sbyte_unaligned_inc, read_ubyte_unaligned and read_sbyte_unaligned were dropped. There are currently no uses for these calls. Signed-off-by: Petr Machata <[email protected]>
* libdw (get_sleb128_step): Remove undefined behavior.Mark Wielaard2014-04-241-2/+2
| | | | | | | | As pointed out by gcc -fsanitize=undefined left shifting a negative value is undefined. Replace it with a multiplication of the signed value as suggested by Richard Henderson and Josh Stone. Signed-off-by: Mark Wielaard <[email protected]>
* libdw: Simplify and inline get_uleb128 and get_sleb128Josh Stone2013-12-131-69/+38
| | | | | | | This removes the IS_LIBDW distinction so LEB128 operations are now always inlined, and the implementations are simplified, more direct. Signed-off-by: Josh Stone <[email protected]>
* dwfl_link_map_report: Handle unaligned auxv data.Roland McGrath2013-01-071-1/+9
| | | | Signed-off-by: Roland McGrath <[email protected]>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-40/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change name from "Red Hat elfutils" to "elfutils". * Update license of standalone tools and test from GPLv2 to GPLv3+. * Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+. * Add Developer Certificate of Origin based contributor policy. top-level: - COPYING: Upgraded from GPLv2 to GPLv3. - CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files. - NEWS: Added note about new contribution and license policy. - Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST. - configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'. backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf: - All files updated to GPLv2/LGPLv3+. Except some very small files (<5 lines) which didn't have any headers at all before, the linker .maps files and the libcpu/defs files which only contain data and libelf/elf.h which comes from glibc and is under LGPLv2+. config: - elfutils.spec.in: Add new License: headers and new %doc files. - Update all license headers to GPLv2/LGPLv3+ for files used by libs. src, tests: - All files updated to GPLv3+. Except for the test bz2 data files, the linker maps and script files and some very small files (<5 lines) that don't have any headers. Signed-off-by: Richard Fontana <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Fix readelf for large SLEB128 values.Roland McGrath2010-06-211-7/+11
|
* CFI support: lookup by PC and translate into DWARF location per registerRoland McGrath2009-07-081-12/+25
|
* Implement call frame information dumping.Ulrich Drepper2009-01-061-1/+23
|
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-8/+44
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* Adjust for monotone.Ulrich Drepper2005-07-261-0/+240