[llvm-commits] FW: Atom alignment

Shankar Kalpathi Easwaran shankarke at gmail.com
Mon Oct 15 11:54:03 PDT 2012


Hi,

I think we will also get gaps in the output if the atoms are processed in a
out of order fashion.

Example:

Say there are two files that are part of the linking process 1.o, 2.o

1.o has data symbols (a, b)
2.o has data symbols (c, d)

a, b has alignment requirements of 4 whereas c, d has alignment
requirements of 16

So when we try to write the output with the following use cases :

1) the atoms appear as a,b,c,d the output file appears properly
2) the atoms appear as a,c,b,d the output file will have gaps
3) whenever there is an atom movement because of symbol resolution, the
output file will have gaps too

How do we go about without having gaps in the output file consistently and
the output file using optimum space ?

Should the sections and the atom offsets be fixed after running it through
the Reader.

Thanks

Shankar Easwaran
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
by The Linux Foundation


>
> -----Original Message-----
> From: Sid Manning [mailto:sidneym at codeaurora.org]
> Sent: Monday, October 15, 2012 11:23 AM
> To: LLVM Commits; Hemant Kulkarni; Michael Spencer; Nick Kledzik; Evandro;
> Easwaran, Shankar
> Subject: Atom alignment
>
>
> DefinedAtom's alignment method is applying section alignment constraints
> to every atom in the chunk and this causes gaps in the output.  This change
> returns alignment only if the atom is a section symbol.
>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121015/904d6c11/attachment.html>


More information about the llvm-commits mailing list