Summary: | MinGW Binaries can be built with misaligned relocation information | ||
---|---|---|---|
Product: | binutils | Reporter: | marc |
Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | martin, nickc, victor.dyachenko |
Priority: | P2 | ||
Version: | 2.30 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
marc
2018-11-07 20:50:51 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=73af69e74974eaa155eec89867e3ccc77ab39f6d commit 73af69e74974eaa155eec89867e3ccc77ab39f6d Author: Marc <marc@groundctl.com> Date: Fri Nov 9 11:13:50 2018 +0000 Allow for compilers that do not produce aligned .rdat sections in PE format files. PR 23872 * scripttempl/pep.sc (pe.sc): Ensure rdata_runtime_pseudo_relocs are aligned. * scripttempl/pep.sc (pep.sc): Likewise. Hi Marc, It sounds a bit suspicious that clang is not aligning the relocs, but I see no reason why the linker scripts should not cope with the fact, so I have checked in your patch. Cheers Nick (In reply to Nick Clifton from comment #2) > > It sounds a bit suspicious that clang is not aligning the relocs Just for discussion, clang doesn't align the relocs (as they are produced by ld) - I presume you meant why clang doesn't align the rdata section. Judging from the linker script, wouldn't it mostly be a case of clang producing object files with .rdata sections that end with an uneven number of bytes? And I don't see how that would be suspicious. I haven't dug into a full case of this happening though. In any case, the applied patch certainly is right though. (I'm just arguing because I don't think there is a bug to be fixed on the clang side wrt this, as someone is led to believe in https://bugs.llvm.org/show_bug.cgi?id=39754.) |