mirror of
https://github.com/rui314/mold.git
synced 2024-11-11 16:58:12 +03:00
temporary
This commit is contained in:
parent
8f27c88db3
commit
a3ccd267db
2
main.cc
2
main.cc
@ -338,7 +338,7 @@ static u64 set_osec_offsets(ArrayRef<OutputChunk *> output_chunks) {
|
||||
if (!chunk->is_bss())
|
||||
fileoff += chunk->get_size();
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
bool is_tbss = chunk->is_bss() && (chunk->shdr.sh_flags & SHF_TLS);
|
||||
if (!is_tbss)
|
||||
vaddr += chunk->get_size();
|
||||
|
@ -131,8 +131,9 @@ void OutputPhdr::copy_to(u8 *buf) {
|
||||
OutputChunk *back = ent.members.back();
|
||||
|
||||
ent.phdr.p_offset = front->shdr.sh_offset;
|
||||
ent.phdr.p_filesz =
|
||||
back->shdr.sh_offset + back->get_size() - front->shdr.sh_offset;
|
||||
ent.phdr.p_filesz = back->is_bss()
|
||||
? back->shdr.sh_offset - front->shdr.sh_offset
|
||||
: back->shdr.sh_offset - front->shdr.sh_offset + back->get_size();
|
||||
ent.phdr.p_vaddr = front->shdr.sh_addr;
|
||||
ent.phdr.p_memsz =
|
||||
back->shdr.sh_addr + back->get_size() - front->shdr.sh_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user