[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Greg Fitzgerald
garious at gmail.com
Mon Oct 15 19:16:11 PDT 2012
Getting closer... When emitting symbols, how do I set the symbol's value
to the address of the current instruction? Do I need to emit a label in
the current section and another that uses the former to point to the
latter? If possible, a code sample would be very helpful.
And probably questions for Tim, are these "section-relative" mapping
symbols, as defined in 4.6.5.1 of the ELF for ARM document? And what to
put in the alignment field? I see GCC outputting 1, 3, 4, but I don't see
a description of that field in the doc.
Lastly, from MCELFStreamer, how do I determine if we generating an ARM or
Thumb ELF? I can catch Thumb from the EmitThumbFunc, but that seems a
little odd. Suggestions?
Here's what I have so far:
$ readelf -s via-llvm-as.o | grep "\$."
2: 00000000 0 NOTYPE LOCAL DEFAULT 4 $d
3: 00000000 0 NOTYPE LOCAL DEFAULT 4 $t
$ readelf -s via-gcc-as.o | grep "\$."
5: 00000000 0 NOTYPE LOCAL DEFAULT 1 $t
15: 0000020c 0 NOTYPE LOCAL DEFAULT 1 $d
17: 00000218 0 NOTYPE LOCAL DEFAULT 1 $t
44: 00000732 0 NOTYPE LOCAL DEFAULT 1 $d
45: 0000073e 0 NOTYPE LOCAL DEFAULT 1 $t
65: 00000000 0 NOTYPE LOCAL DEFAULT 4 $d
66: 00000000 0 NOTYPE LOCAL DEFAULT 3 $d
Thanks,
Greg
On Wed, Oct 10, 2012 at 1:08 PM, Greg Fitzgerald <garious at gmail.com> wrote:
> Great, thanks for your help. I'll take a crack at it and contact
> Renato if I have questions.
>
> -Greg
>
>
> On Wed, Oct 10, 2012 at 1:05 PM, Jim Grosbach <grosbach at apple.com> wrote:
> > Cool; glad to help.
> >
> > When I added the data region bits, I tried to keep the ARM-style
> annotations in mind a bit, so hopefully things will fit together without
> too much trouble.
> >
> > -Jim
> >
> > On Oct 10, 2012, at 12:05 PM, Renato Golin <rengolin at systemcall.org>
> wrote:
> >
> >> Thanks Jim!
> >>
> >> I have updated the bug with your comments, I think it's a good start.
> >>
> >> Greg, let me know if that's not enough, I think I can help you from now
> on.
> >>
> >> cheers,
> >> --renato
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121015/a25e77ea/attachment.html>
More information about the llvm-dev
mailing list