This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]