[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20875] New: avr-ld: section `.text' will not fit in region `text
From: |
crisgyorgus at gmail dot com |
Subject: |
[Bug ld/20875] New: avr-ld: section `.text' will not fit in region `text' |
Date: |
Sun, 27 Nov 2016 11:46:02 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20875
Bug ID: 20875
Summary: avr-ld: section `.text' will not fit in region `text'
Product: binutils
Version: 2.26
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: crisgyorgus at gmail dot com
Target Milestone: ---
I assemble a simple code for the atmel's atmega16 mcu with the following
command:
avr-as -mmcu=atmega16 -o _uC_assembled uC_source.s
The code is written in assembler only.
When I try to link it with avr-ld:
avr-ld -Map _map_file -o _uC_linked _uC_assembled
I get following error:
avr-ld: _uC_linked section `.text' will not fit in region `text'
The error would suggest the code is larger than the mcu flash memory available,
but this is not true. I get the error when the code is larger than 8KB, but the
mcu has 16KB of flash memory.
avr-size on the assembled code reports:
text data bss dec hex filename
8194 0 0 8194 2002 _uC_assembled
(2 bytes more than 8KB!)
I don't use gcc, nor any C libraries or internal macros & definitions.
The only info I pass to the assembler for the size of the available flash is
"-mmcu=atmega16", and it should be enough.
In the generated map file, I have following line:
0x0000000000002000 __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)
? __TEXT_REGION_LENGTH__:0x2000
So, obviously, __TEXT_REGION_LENGTH__ is not defined and default value, 0x2000,
is chosen.
If I'm doing something wrong, please help, otherwise I think it's a bug.
OS: Linux,
GNU Binutils: 2.26.1
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/20875] New: avr-ld: section `.text' will not fit in region `text',
crisgyorgus at gmail dot com <=