[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/18614] New: Common symbols with local binding are not allocate
From: |
c-addison at ti dot com |
Subject: |
[Bug gold/18614] New: Common symbols with local binding are not allocated by the linker |
Date: |
Mon, 29 Jun 2015 21:48:45 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=18614
Bug ID: 18614
Summary: Common symbols with local binding are not allocated by
the linker
Product: binutils
Version: 2.24
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: c-addison at ti dot com
CC: ian at airs dot com
Target Milestone: ---
Created attachment 8401
--> https://sourceware.org/bugzilla/attachment.cgi?id=8401&action=edit
Test case containing main.o, local_common.o, and global_common.o
It appears that the linker does not allocate space for common symbols that are
STB_LOCAL in the memory map. The symbol value, which is the alignment, is used
as the address for the symbol in the final executable. I am attaching two
object files produced by the TI ARM compiler, one with a local common symbol
and the other with a global common symbol. You can build:
arm-none-eabi-ld main.o local_common.o
If you examine the executable created by that link, the symbol local_x remains
a common symbol in the executable file. You will also see that the references
to local_x have the value 0x4, which is incorrect.
arm-none-eabi-ld main.o global_common.o
If you examine this executable file, you will see that the symbol global_x is
correctly allocated.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/18614] New: Common symbols with local binding are not allocated by the linker,
c-addison at ti dot com <=