summaryrefslogtreecommitdiff
path: root/Userland/Utilities/readelf.cpp
AgeCommit message (Collapse)Author
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-22readelf: Port to LibMainBrian Gianforcaro
2022-02-11Utilities/readelf: Add printing for RELR relocationsDaniel Bertalan
2022-01-24Utilities/readelf: Add support for printing the content of sectionsDaniel Bertalan
2022-01-16readelf: Fall back to default interpreter path on empty pathThijs Waalen
This fixes readelf failing to map the interpreter for dynamic libraries. When an ELF does not have the PT_INTERP header the StringView will be of the inline capacity of the StringBuilder, not a null StringView. This would cause readelf not to fallback on the default interpreter path.
2022-01-13LibELF: Accept Span instead of Pointer+Size in validate_program_headersIdan Horowitz
2022-01-13LibELF: Use StringBuilders instead of Strings for the interpreter pathIdan Horowitz
This is required for the Kernel's usage of LibELF, since Strings do not expose allocation failure.
2021-11-23LibCore+AK: Move MappedFile from AK to LibCoreAndreas Kling
MappedFile is strictly a userspace thing, so it doesn't belong in AK (which is supposed to be user/kernel agnostic.)
2021-10-21LibELF+Userland: Move a few functions to Elf::ImageValtteri Koskivuori
These were originally in `readelf`, but they became useful in `file` as well, so they are now available in Elf::Image with a slightly revised API.
2021-09-26LibELF+readelf: Remove duplicated dtag->string mapRodrigo Tobar
A copy of the same mapping was found both in LibELF and in the readelf utility, which uses LibELF; keeping them both is redundant and removing the duplicate saves (a bit of) space.
2021-09-11Utilities: Show dynamic ELF info with "show all" optionRodrigo Tobar
2021-07-22Utilities: Make the columns for readelf fit all reloc types on x86_64Gunnar Beutner
2021-07-22LibELF+Utilities: Avoid truncating 64-bit valuesGunnar Beutner
This fixes displaying 64-bit addresses in readelf and also fixes showing backtraces from core dumps on x86_64.
2021-07-22Utilities: Make sure columns are properly aligned for readelf on x86_64Gunnar Beutner
2021-07-22Everywhere: Prefix hexadecimal numbers with 0xGunnar Beutner
Depending on the values it might be difficult to figure out whether a value is decimal or hexadecimal. So let's make this more obvious. Also this allows copying and pasting those numbers into GNOME calculator and probably also other apps which auto-detect the base.
2021-07-18readelf: Add names for x86_64 relocations and machine typeGunnar Beutner
2021-06-28Kernel+LibELF: Add support for validating and loading ELF64 executablesGunnar Beutner
2021-06-01Userland: Replace most printf-style APIs with AK::Format APIs :^)Linus Groh
2021-05-16AK+Kernel+LibELF: Remove the need for `IteratorDecision::Continue`Nicholas Baron
By constraining two implementations, the compiler will select the best fitting one. All this will require is duplicating the implementation and simplifying for the `void` case. This constraining also informs both the caller and compiler by passing the callback parameter types as part of the constraint (e.g.: `IterationFunction<int>`). Some `for_each` functions in LibELF only take functions which return `void`. This is a minimal correctness check, as it removes one way for a function to incompletely do something. There seems to be a possible idiom where inside a lambda, a `return;` is the same as `continue;` in a for-loop.
2021-04-25LibC+LibELF: Implement more fully-features dlfcn functionalityGunnar Beutner
This implements more of the dlfcn functionality. Most notably: * It's now possible to dlopen() libraries which were already loaded at program startup time. This does not cause those libraries to be loaded twice. * Errors are reported via dlerror() rather than by crashing the program. * Calls to the dl*() functions are thread-safe.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-21readelf: Remove an unnecessary String::format()Andreas Kling
2021-04-11LibC: Move S_* defines into <fcntl.h>Gunnar Beutner
According to the Single UNIX Specification, Version 2 that's where those macros should be defined. This fixes the libiconv port. This also fixes some (but not all) build errors for the diffutils and nano ports.
2021-03-29LibElf+readelf: Parse ELFs with no program headers correctlyIdan Horowitz
This simply fixes a check which assumed the program header count was always non zero.
2021-03-22readelf: Use Loader.so interpreter for dynamic section and symbolsBrendan Coles
2021-03-19readelf: Add --checksec flag to display security hardening infoBrendan Coles
2021-03-14readelf: Tweak section headers output column paddingBrendan Coles
2021-03-14readelf: Add support for core notes and relocationsBrendan Coles
2021-03-12Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)Andreas Kling
Good-bye LogStream. Long live AK::Format!
2021-01-12Userland: Move command-line utilities to Userland/Utilities/Andreas Kling