[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/23872] New: MinGW Binaries can be built with misaligned relocati
From: |
marc at groundctl dot com |
Subject: |
[Bug ld/23872] New: MinGW Binaries can be built with misaligned relocation information |
Date: |
Wed, 07 Nov 2018 20:50:51 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23872
Bug ID: 23872
Summary: MinGW Binaries can be built with misaligned relocation
information
Product: binutils
Version: 2.30
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: marc at groundctl dot com
Target Milestone: ---
Clang does not align certain sections in its object files, so when they are
linked it is possible that the runtime relocation sections are not aligned.
This causes the linker to re-align them, but the value of "rt_psrelocs_start"
is set before the realignment, so when the dll is loaded it looks in the wrong
place for the relocations and fails.
This can be fixed by forcing realignment by adding the line ". = ALIGN(4);" to
the linker script immediately before setting rt_psrelocs_start.
This bug was also reported to MinGW64:
https://sourceforge.net/p/mingw-w64/bugs/769/
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/23872] New: MinGW Binaries can be built with misaligned relocation information,
marc at groundctl dot com <=