DJGPP and alignment
Ian Lance Taylor
ian@zembu.com
Thu Jul 22 11:53:00 GMT 1999
From: John Marshall <John_W_Marshall@palm.com>
Date: Thu, 22 Jul 1999 08:23:26 -0700 (PDT)
I've been adding a collect-sections-to-make-data kind of thing to
m68kcoff (it does the same sort of job as .rel.sdata in mipsecoff:
loadtime relocations for data sections). My data is 10 byte records.
It seems I have three choices:
1. Admit defeat and pad each record to 12 bytes.
2. Override coff_new_section_hook like in coff-sh.c.
3. Add yet another special case for my little section to
coff_new_section_hook in coffcode.h.
Is there any advice as to the "right way"? At the moment I'm using #2,
but it feels like overkill, and, for a bfd neophyte like me, it took ages
to figure out. I feel like maybe the "spirit of coff" is #1.
I think the right way is choice 2, as you are doing.
Actually, I think the right way is to switch to ELF, which permits the
alignment to be specified on a section by section basis.
Ian
More information about the Binutils
mailing list