[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/16781] New: gold breaks alignment of global variable
From: |
daniel.oertwig+sourcewarebug at gmail dot com |
Subject: |
[Bug gold/16781] New: gold breaks alignment of global variable |
Date: |
Mon, 31 Mar 2014 10:21:02 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=16781
Bug ID: 16781
Summary: gold breaks alignment of global variable
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ian at airs dot com
Reporter: daniel.oertwig+sourcewarebug at gmail dot com
CC: ccoutant at google dot com
Created attachment 7506
--> https://sourceware.org/bugzilla/attachment.cgi?id=7506&action=edit
Map produced when linking with gold, broken variable alignment
Linking with gold breaks the alignment requirement I set on a global variable,
using the C++11 alignas specifier. Linking the same with the default ld works.
I suspect this only happens in combination with memory regions in the linker
script, but I could not verify this.
I am using clang++ to compile, and clang++ (which defaults to gold on my
system) to link. I attached the map file produced as bug.map, where you can see
that the variable bug does not start at a correctly aligned address.
Using g++ (which I guess is using the "old" linker) to link and still clang++
to compile works fine, as seen in the attached good.map.
Using g++ both to link and compile fails, too.
But this is not linker related, as the alignemnt requirement is already broken
in the *.o file.
I tried to strip down a minimal example, seen in goldbug.cpp. The linker script
used is in the attached goldbug.ld.
Let me know if I can help any further!
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/16781] New: gold breaks alignment of global variable,
daniel.oertwig+sourcewarebug at gmail dot com <=
- [Bug gold/16781] gold breaks alignment of global variable, daniel.oertwig+sourcewarebug at gmail dot com, 2014/03/31
- [Bug gold/16781] gold breaks alignment of global variable, daniel.oertwig+sourcewarebug at gmail dot com, 2014/03/31
- [Bug gold/16781] gold breaks alignment of global variable, daniel.oertwig+sourcewarebug at gmail dot com, 2014/03/31
- [Bug gold/16781] gold breaks alignment of global variable, daniel.oertwig+sourcewarebug at gmail dot com, 2014/03/31
- [Bug gold/16781] gold breaks alignment of global variable, daniel.oertwig+sourcewarebug at gmail dot com, 2014/03/31