mirror of
https://github.com/rui314/mold.git
synced 2024-12-25 17:34:02 +03:00
temporary
This commit is contained in:
parent
781371f242
commit
9c08415553
12
main.cc
12
main.cc
@ -780,20 +780,14 @@ static void fix_synthetic_symbols(ArrayRef<OutputChunk *> chunks) {
|
||||
if (chunk->kind == OutputChunk::HEADER)
|
||||
continue;
|
||||
|
||||
if (chunk->shdr.sh_flags & SHF_ALLOC) {
|
||||
stop(chunk, out::end);
|
||||
if (chunk->shdr.sh_flags & SHF_ALLOC)
|
||||
stop(chunk, out::_end);
|
||||
}
|
||||
|
||||
if (chunk->shdr.sh_flags & SHF_EXECINSTR) {
|
||||
stop(chunk, out::etext);
|
||||
if (chunk->shdr.sh_flags & SHF_EXECINSTR)
|
||||
stop(chunk, out::_etext);
|
||||
}
|
||||
|
||||
if (chunk->shdr.sh_type != SHT_NOBITS && chunk->shdr.sh_flags & SHF_ALLOC) {
|
||||
stop(chunk, out::edata);
|
||||
if (chunk->shdr.sh_type != SHT_NOBITS && chunk->shdr.sh_flags & SHF_ALLOC)
|
||||
stop(chunk, out::_edata);
|
||||
}
|
||||
}
|
||||
|
||||
// __start_ and __stop_ symbols
|
||||
|
3
mold.h
3
mold.h
@ -472,11 +472,8 @@ inline Symbol *__fini_array_start;
|
||||
inline Symbol *__fini_array_end;
|
||||
inline Symbol *__preinit_array_start;
|
||||
inline Symbol *__preinit_array_end;
|
||||
inline Symbol *end;
|
||||
inline Symbol *_end;
|
||||
inline Symbol *etext;
|
||||
inline Symbol *_etext;
|
||||
inline Symbol *edata;
|
||||
inline Symbol *_edata;
|
||||
}
|
||||
|
||||
|
@ -566,13 +566,6 @@ ObjectFile *ObjectFile::create_internal_file(ArrayRef<OutputChunk *> chunks) {
|
||||
out::_etext = add("_etext", STB_GLOBAL);
|
||||
out::_edata = add("_edata", STB_GLOBAL);
|
||||
|
||||
if (!Symbol::intern("end")->file)
|
||||
out::end = add("end", STB_GLOBAL);
|
||||
if (!Symbol::intern("etext")->file)
|
||||
out::etext = add("etext", STB_GLOBAL);
|
||||
if (!Symbol::intern("edata")->file)
|
||||
out::edata = add("edata", STB_GLOBAL);
|
||||
|
||||
for (OutputChunk *chunk : chunks) {
|
||||
if (!is_c_identifier(chunk->name))
|
||||
continue;
|
||||
|
@ -4,7 +4,7 @@
|
||||
// RUN: mold -o %t.exe %t1.o %t2.o
|
||||
// RUN: readelf --symbols %t.exe | FileCheck %s
|
||||
|
||||
// CHECK: Symbol table '.symtab' contains 22 entries:
|
||||
// CHECK: Symbol table '.symtab' contains 19 entries:
|
||||
// CHECK: Num: Value Size Type Bind Vis Ndx Name
|
||||
// CHECK: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
// CHECK: 1: 0000000000201000 0 NOTYPE LOCAL DEFAULT 8 local1
|
||||
@ -25,9 +25,6 @@
|
||||
// CHECK: 16: 0000000000202110 0 NOTYPE GLOBAL DEFAULT 11 _end
|
||||
// CHECK: 17: 0000000000201001 0 NOTYPE GLOBAL DEFAULT 8 _etext
|
||||
// CHECK: 18: 0000000000202110 0 NOTYPE GLOBAL DEFAULT 11 _edata
|
||||
// CHECK: 19: 0000000000202110 0 NOTYPE GLOBAL DEFAULT 11 end
|
||||
// CHECK: 20: 0000000000201001 0 NOTYPE GLOBAL DEFAULT 8 etext
|
||||
// CHECK: 21: 0000000000202110 0 NOTYPE GLOBAL DEFAULT 11 edata
|
||||
|
||||
.globl foo, bar, this_is_global
|
||||
local1:
|
||||
|
Loading…
Reference in New Issue
Block a user