mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 771569 - Move elfhack sections before .rel{,a}.dyn to work around glibc 2.16 bug. r=nfroyd
This commit is contained in:
parent
d5d4583352
commit
9d8fb12142
@ -442,7 +442,7 @@ int do_relocation_section(Elf *elf, unsigned int rel_type, unsigned int rel_type
|
|||||||
relhack_entry.r_offset = relhack_entry.r_info = 0;
|
relhack_entry.r_offset = relhack_entry.r_info = 0;
|
||||||
relhack->push_back(relhack_entry);
|
relhack->push_back(relhack_entry);
|
||||||
|
|
||||||
relhackcode->insertAfter(section);
|
relhackcode->insertBefore(section);
|
||||||
relhack->insertAfter(relhackcode);
|
relhack->insertAfter(relhackcode);
|
||||||
|
|
||||||
unsigned int old_end = section->getOffset() + section->getSize();
|
unsigned int old_end = section->getOffset() + section->getSize();
|
||||||
|
@ -360,6 +360,23 @@ public:
|
|||||||
markDirty();
|
markDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void insertBefore(ElfSection *section, bool dirty = true) {
|
||||||
|
if (previous != NULL)
|
||||||
|
previous->next = next;
|
||||||
|
if (next != NULL)
|
||||||
|
next->previous = previous;
|
||||||
|
next = section;
|
||||||
|
if (section != NULL) {
|
||||||
|
previous = section->previous;
|
||||||
|
section->previous = this;
|
||||||
|
} else
|
||||||
|
previous = NULL;
|
||||||
|
if (previous != NULL)
|
||||||
|
previous->next = this;
|
||||||
|
if (dirty)
|
||||||
|
markDirty();
|
||||||
|
}
|
||||||
|
|
||||||
void markDirty() {
|
void markDirty() {
|
||||||
if (link != NULL)
|
if (link != NULL)
|
||||||
shdr.sh_link = -1;
|
shdr.sh_link = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user