ladybird/Userland/Libraries/LibELF
Brian Gianforcaro 2038d2c49e LibELF: Apply some minor optimizations to symbol lookup
Optimizations:

- Make sure `DT_SYMTAB` is a string view literal, instead of string.

- DynamicObject::HashSection::lookup_sysv_symbol should be using
  raw_name() from symbol comparison to avoid needlessly calling
  `strlen`, when the StrinView::operator= walks the cstring without
  calling `strlen` first.

- DynamicObject::HashSection::lookup_gnu_symbol shouldn't create a
  symbol unless we know the hashes match first.

In order to test these changes I enabled Undefined behavior sanitizer
which creates a huge amount of relocations, and then ran the browser
with the help argument 100 times. The browser is a fairly big app with
a few different libraries being loaded, so it seemed liked a good
target.

Command: `time -n 100 br --help`

Before:
```
Timing report:
==============
Command:         br --help
Average time:    3897.679931 ms
Excluding first: 3901.242431 ms
```

After:
```
Timing report:
==============
Command:         br --help
Average time:    3612.860107 ms
Excluding first: 3613.54541 ms
```
2021-08-28 20:03:08 +02:00
..
Arch CMake: Let Meta/serenity.sh run aarch64 make it past cmake 2021-08-28 14:43:07 +01:00
AuxiliaryVector.h Kernel: Properly set up the userland context for new processes on x86_64 2021-06-28 22:29:28 +02:00
CMakeLists.txt LibELF+LibTest: Fix serenity_install_sources() paths 2021-03-15 09:06:10 +01:00
Core.h Everywhere: Core dump => Coredump 2021-08-23 00:02:09 +02:00
DynamicLinker.cpp LibELF/DynamicLinker: Evaluate symbols in library insertion order (#8802) 2021-07-16 11:55:01 +02:00
DynamicLinker.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DynamicLoader.cpp LibELF+LibTest: Fix incorrect #ifdef 2021-08-12 08:16:07 +02:00
DynamicLoader.h LibELF: Swap the arguments for negative_offset_from_tls_block_end 2021-07-04 01:07:28 +02:00
DynamicObject.cpp LibELF: Apply some minor optimizations to symbol lookup 2021-08-28 20:03:08 +02:00
DynamicObject.h LibELF+Utilities: Avoid truncating 64-bit values 2021-07-22 08:57:01 +02:00
Hashes.h AK+Userland: Use akaster@serenityos.org for my copyright headers 2021-05-30 14:35:34 +01:00
Image.cpp LibELF+Utilities: Avoid truncating 64-bit values 2021-07-22 08:57:01 +02:00
Image.h LibELF+Utilities: Avoid truncating 64-bit values 2021-07-22 08:57:01 +02:00
Relocation.cpp LibELF: Fix unaligned writes in the relocation code 2021-07-27 13:15:16 +02:00
Relocation.h DynamicLoader+LibELF: Move self-relocation code into a separate file 2021-07-27 13:15:16 +02:00
Validation.cpp LibELF: Check for missing PT_LOAD alignment header value 2021-07-01 10:50:49 +02:00
Validation.h Kernel+LibELF: Add support for validating and loading ELF64 executables 2021-06-28 22:29:28 +02:00