mirror of
https://github.com/rui314/mold.git
synced 2024-09-23 02:49:12 +03:00
temporary
This commit is contained in:
parent
3486f94eb5
commit
64e85738ba
6
mold.h
6
mold.h
@ -259,7 +259,11 @@ public:
|
||||
// Program header
|
||||
class OutputPhdr : public OutputChunk {
|
||||
public:
|
||||
void copy_to(uint8_t *buf) override;
|
||||
void copy_to(uint8_t *buf) override {
|
||||
auto *p = (ELF64LE::Phdr *)(buf + offset);
|
||||
for (Phdr &ent : entries)
|
||||
*p++ = ent.phdr;
|
||||
}
|
||||
|
||||
uint64_t get_size() const override {
|
||||
return entries.size() * sizeof(ELF64LE::Phdr);
|
||||
|
@ -33,12 +33,6 @@ void OutputEhdr::relocate(uint8_t *buf) {
|
||||
hdr->e_shstrndx = out::shstrtab->index;
|
||||
}
|
||||
|
||||
void OutputPhdr::copy_to(uint8_t *buf) {
|
||||
auto *p = (ELF64LE::Phdr *)buf;
|
||||
for (Phdr &ent : entries)
|
||||
*p++ = ent.phdr;
|
||||
}
|
||||
|
||||
static uint32_t to_phdr_flags(uint64_t sh_flags) {
|
||||
uint32_t ret = PF_R;
|
||||
if (sh_flags & SHF_WRITE)
|
||||
|
Loading…
Reference in New Issue
Block a user