[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25081] New: Discrepancy between VMA and LMA after ALIGN
From: |
joey.ye at arm dot com |
Subject: |
[Bug ld/25081] New: Discrepancy between VMA and LMA after ALIGN |
Date: |
Tue, 08 Oct 2019 12:55:08 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25081
Bug ID: 25081
Summary: Discrepancy between VMA and LMA after ALIGN
Product: binutils
Version: 2.34 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: joey.ye at arm dot com
Target Milestone: ---
Following case fails with trunk 2.33 on x86_64 and arm, and seems to be working
with 2.27:
$ cat a.c
int g = 4;
int main()
{
return g;
}
$ cat s.ld
MEMORY
{
FLASH (rx) : ORIGIN = 0, LENGTH = 0x10000000
RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 0x10000000
}
ENTRY(main)
SECTIONS
{
.text :
{
*(.text*)
/* Force text section end unaligned */
. = ALIGN(16);
LONG(0)
LONG(0)
LONG(0)
} > FLASH
.sec1 : ALIGN(16)
{
*(.section_noexist)
/* Aligning LMA in a leading empty section, for some reason
doesn't align VMA according */
. = ALIGN(16);
__some_symbol = .;
} > FLASH
.sec2 :
{
/* To reproduce following must match one or more empty sections */
/* Discrepancy between VMA and LMA starts from here */
*(.bss*)
} > FLASH
.sec3 :
{
/* Discrepancy between VMA and LMA remains here */
LONG(0)
LONG(0)
} > FLASH
.data :
{
*(.data*)
} > RAM AT> FLASH
.bss :
{
*(COMMON)
} > RAM
}
$ ld -v
GNU ld (GNU Binutils) 2.33.50.20191008
$ gcc -c a.c
$ ld -T s.ld -Map=a.map a.o -o a.out
ld: section .data LMA [0000000000000060,0000000000000063] overlaps section
.sec3 LMA [0000000000000060,0000000000000067]
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/25081] New: Discrepancy between VMA and LMA after ALIGN,
joey.ye at arm dot com <=
- [Bug ld/25081] Discrepancy between VMA and LMA after ALIGN, amodra at gmail dot com, 2019/10/09
- [Bug ld/25081] Discrepancy between VMA and LMA after ALIGN, tnfchris at sourceware dot org, 2019/10/09
- [Bug ld/25081] Discrepancy between VMA and LMA after ALIGN, cvs-commit at gcc dot gnu.org, 2019/10/09
- [Bug ld/25081] Discrepancy between VMA and LMA after ALIGN, amodra at gmail dot com, 2019/10/09
- [Bug ld/25081] Discrepancy between VMA and LMA after ALIGN, joey.ye at arm dot com, 2019/10/09
- [Bug ld/25081] Discrepancy between VMA and LMA after ALIGN, cvs-commit at gcc dot gnu.org, 2019/10/10