public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ALIGN and BLOCK in linker scripts
@ 2011-01-21 13:50 Paulo J. Matos
  2011-01-23  3:46 ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Paulo J. Matos @ 2011-01-21 13:50 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-28 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21 13:50 ALIGN and BLOCK in linker scripts Paulo J. Matos
2011-01-23  3:46 ` Alan Modra
2011-01-26 17:58   ` Paulo J. Matos
2011-01-28  2:48     ` Alan Modra
2011-01-28 11:31       ` Paulo J. Matos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).