mirror of
https://github.com/rui314/mold.git
synced 2024-11-14 16:31:42 +03:00
temporary
This commit is contained in:
parent
5e9e3a41d4
commit
53bae89117
4
mold.h
4
mold.h
@ -367,7 +367,7 @@ private:
|
||||
|
||||
class GotSection : public OutputChunk {
|
||||
public:
|
||||
typedef enum : u8 { REGULAR, TP } GotType;
|
||||
typedef enum : u8 { REGULAR, TP } Kind;
|
||||
|
||||
GotSection() {
|
||||
name = ".got";
|
||||
@ -382,7 +382,7 @@ public:
|
||||
u64 get_size() const override { return size; }
|
||||
|
||||
u64 size = 0;
|
||||
std::vector<std::pair<GotType, Symbol *>> symbols;
|
||||
std::vector<std::pair<Kind, Symbol *>> symbols;
|
||||
};
|
||||
|
||||
class ShstrtabSection : public OutputChunk {
|
||||
|
@ -171,10 +171,10 @@ void GotSection::relocate(u8 *buf) {
|
||||
buf += shdr.sh_offset;
|
||||
|
||||
for (auto pair : symbols) {
|
||||
GotType type = pair.first;
|
||||
Kind kind = pair.first;
|
||||
Symbol *sym = pair.second;
|
||||
|
||||
if (type == REGULAR)
|
||||
if (kind == REGULAR)
|
||||
*(u64 *)buf = sym->addr;
|
||||
else
|
||||
*(u64 *)buf = sym->addr - out::tls_end;
|
||||
|
Loading…
Reference in New Issue
Block a user