From f902d8b23465107ef53cffadaffc7d2a953e0cea Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 20 Jan 2021 18:26:57 +0900 Subject: [PATCH] temporary --- BUGS.md | 4 ++++ mold.h | 1 + object_file.cc | 2 ++ 3 files changed, 7 insertions(+) diff --git a/BUGS.md b/BUGS.md index 35ebb75c..0484f07c 100644 --- a/BUGS.md +++ b/BUGS.md @@ -144,3 +144,7 @@ If you forget to add an entry with type DT_DEBUG to .dynamic, gdb's `info sharedlibrary` command doesn't print out a list of shared libraries loaded to memory. The value of the entry doesn't matter, so it can be just zero. The existence of it is important. + +# + +__EH_FRAME_BEGIN__ in libgcc/crtstuff.c diff --git a/mold.h b/mold.h index b8ad80b0..0c18e0f0 100644 --- a/mold.h +++ b/mold.h @@ -335,6 +335,7 @@ public: u64 reldyn_offset = 0; bool is_comdat_member = false; bool is_alive = true; + bool is_ehframe = false; void apply_reloc_alloc(u8 *base); void apply_reloc_nonalloc(u8 *base); diff --git a/object_file.cc b/object_file.cc index 7e8f2362..2c396a96 100644 --- a/object_file.cc +++ b/object_file.cc @@ -190,6 +190,7 @@ void ObjectFile::initialize_ehframe_sections() { InputSection *isec = sections[i]; if (isec && isec->name == ".eh_frame") { read_ehframe(*isec); + isec->is_ehframe = true; sections[i] = nullptr; } } @@ -213,6 +214,7 @@ void ObjectFile::read_ehframe(InputSection &isec) { if (size == 0) { if (data.size() != 4) Fatal() << *isec.file << ": .eh_frame: garbage at end of section"; + cies.push_back({data, {}, {}}); return; }