1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-14 07:18:42 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-30 17:58:04 +09:00
parent 5e9e3a41d4
commit 53bae89117
2 changed files with 4 additions and 4 deletions

4
mold.h
View File

@ -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 {

View File

@ -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;