mirror of
https://github.com/rui314/mold.git
synced 2024-12-27 10:23:41 +03:00
wip
This commit is contained in:
parent
6acf3c99cc
commit
96075a3e2d
5
main.cc
5
main.cc
@ -1248,6 +1248,11 @@ int main(int argc, char **argv) {
|
||||
for (OutputChunk *chunk : out::chunks)
|
||||
chunk->update_shdr();
|
||||
|
||||
erase(out::chunks, [](OutputChunk *chunk) {
|
||||
return chunk->kind == OutputChunk::SYNTHETIC &&
|
||||
chunk->shdr.sh_size == 0;
|
||||
});
|
||||
|
||||
// Set section indices.
|
||||
for (i64 i = 0, shndx = 1; i < out::chunks.size(); i++)
|
||||
if (out::chunks[i]->kind != OutputChunk::HEADER)
|
||||
|
@ -23,8 +23,8 @@ clang -fuse-ld=`pwd`/../mold $t/a.o $t/b.so -o $t/exe
|
||||
readelf -a $t/exe > $t/log
|
||||
|
||||
fgrep -q '[21] .dynbss.rel.ro' $t/log
|
||||
fgrep -q '[24] .dynbss' $t/log
|
||||
fgrep -q '[25] .dynbss' $t/log
|
||||
fgrep -q '00000000002021e0 100 OBJECT GLOBAL DEFAULT 21 readonly' $t/log
|
||||
fgrep -q '0000000000203040 100 OBJECT GLOBAL DEFAULT 24 readwrite' $t/log
|
||||
fgrep -q '0000000000203040 100 OBJECT GLOBAL DEFAULT 25 readwrite' $t/log
|
||||
|
||||
echo OK
|
||||
|
Loading…
Reference in New Issue
Block a user