Age | Commit message (Collapse) | Author |
|
|
|
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
|
|
These are only used by userland, and are implemented using infallible
Strings, so let's just ifdef them out of the Kernel.
|
|
|
|
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.
|
|
Default implementations allow for more optimizations.
See: https://pvs-studio.com/en/docs/warnings/v832/
|
|
This fixes displaying 64-bit addresses in readelf and also fixes
showing backtraces from core dumps on x86_64.
|
|
Instead we should just generate kernel.map in such a way that it already
contains demangled symbols.
|
|
|
|
|
|
Avoid promotion of static strings to AK::String, instead use
AK::StringView and operator ""sv, to force string view's instead
which avoids allocation of String. This code path isn't hot enough
that it makes a huge difference, but every bit counts.
|
|
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.
|
|
For whatever reason, symbolication was doing an O(n) walk of all the
symbols, despite having sorted them beforehand.
Changing this to a binary_search() makes symbolication noticeably
faster and improves Profiler startup time.
|
|
We were using ELF::Image::section(0) to indicate the "undefined"
section, when what we really wanted was just Optional<Section>.
So let's use Optional instead. :^)
|
|
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 *
|
|
This helper is used by libgcc_s to figure out where the .eh_frame sections
are located for all loaded shared objects.
|
|
The name-to-section lookup table was only used in a handful of places,
and none of them were calling it nearly enough to justify building
a cache for it in the first place. So let's get rid of it and reduce
startup time by a little bit. :^)
|
|
Remove a bunch of unused code, unnecessary const, and make some
non-object-specific member functions static.
|
|
|