This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ALIGN and BLOCK in linker scripts
- From: "Paulo J. Matos" <pocmatos at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 21 Jan 2011 13:47:47 +0000 (UTC)
- Subject: ALIGN and BLOCK in linker scripts
Hi all,
What's the different between using ALIGN and BLOCK as an optional in the
start of an output section. For example:
"pm_region|0" BLOCK(0x4):
{
$pm_region.__Base = .;
. += MAX(0x80000000, 0 + ABSOLUTE(.)) - ABSOLUTE(.);
. = ALIGN(0x4);
out/b85521.o*(PM_1\?$M.main)
} > PM_REGION :PM_REGION
"pm_region|0" ALIGN(0x4):
{
$pm_region.__Base = .;
. += MAX(0x80000000, 0 + ABSOLUTE(.)) - ABSOLUTE(.);
. = ALIGN(0x4);
out/b85521.o*(PM_1\?$M.main)
} > PM_REGION :PM_REGION
Is there any difference between these?
For some reason without the ALIGN/BLOCK in the start of the output
section the linking goes well, but as soon as I add it (either of them) I
get "final link failed: File truncated".
Any tips on what might be wrong above or a way to debug why the link
failed (--verbose says nothing)?
Cheers,
--
PMatos
--
PMatos