mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:18:11 +00:00
LibELF: Fix support for relocating weak symbols
Having unresolved weak symbols is allowed and we should initialize them to zero.
This commit is contained in:
parent
97d7450571
commit
1dab5ca5fd
2 changed files with 20 additions and 10 deletions
|
@ -54,6 +54,11 @@ private:
|
|||
size_t m_size;
|
||||
};
|
||||
|
||||
enum class ShouldInitializeWeak {
|
||||
Yes,
|
||||
No
|
||||
};
|
||||
|
||||
class DynamicLoader : public RefCounted<DynamicLoader> {
|
||||
public:
|
||||
static RefPtr<DynamicLoader> try_create(int fd, String filename);
|
||||
|
@ -145,7 +150,7 @@ private:
|
|||
Success = 1,
|
||||
ResolveLater = 2,
|
||||
};
|
||||
RelocationResult do_relocation(size_t total_tls_size, const DynamicObject::Relocation&);
|
||||
RelocationResult do_relocation(size_t total_tls_size, const DynamicObject::Relocation&, ShouldInitializeWeak should_initialize_weak);
|
||||
size_t calculate_tls_size() const;
|
||||
|
||||
String m_filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue