mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibELF: Allow shared objects which don't have a text segment
Shared objects without a text segment are perfectly OK. For example libicudata.so has only data segments: Sections: Idx Name Size VMA LMA File off Algn 0 .hash 00000014 00000094 00000094 00000094 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .dynsym 00000020 000000a8 000000a8 000000a8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .dynstr 0000002a 000000c8 000000c8 000000c8 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .rodata 01b562d0 00000100 00000100 00000100 2**4 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .eh_frame 00000000 01b563d0 01b563d0 01b563d0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynamic 00000070 01b573d0 01b573d0 01b563d0 2**2
This commit is contained in:
parent
68d1469aea
commit
6c729993a8
Notes:
sideshowbarker
2024-07-18 19:22:45 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/6c729993a8b Pull-request: https://github.com/SerenityOS/serenity/pull/6496
|
@ -306,8 +306,7 @@ void DynamicLoader::load_program_headers()
|
|||
return IterationDecision::Continue;
|
||||
});
|
||||
|
||||
VERIFY(!text_regions.is_empty());
|
||||
VERIFY(!data_regions.is_empty());
|
||||
VERIFY(!text_regions.is_empty() || !data_regions.is_empty());
|
||||
|
||||
auto compare_load_address = [](ProgramHeaderRegion& a, ProgramHeaderRegion& b) {
|
||||
return a.desired_load_address().as_ptr() < b.desired_load_address().as_ptr();
|
||||
|
|
Loading…
Reference in a new issue