Hello, $ objdump -h # displays info about all below sections.... Sections: Idx Name Size VMA LMA File off Algn While, $ llvm-objdump -h # only displays subset of info... Sections: Idx Name Size Address Type Using '--show-lma' could get VMA and LMA details. Can you suggest options to print 'File off' and 'Alng' with llvm-objdump? Thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200707/44cd2575/attachment.html>
James Henderson via llvm-dev
2020-Jul-08 08:27 UTC
[llvm-dev] llvm-objdump print file offset
Hi,
This looks like a bug in llvm-objdump's output (I'd expect it to match
GNU's). There are no options to print the other columns. Could you file a
bug against llvm-objdump at https://bugs.llvm.org/, please?
You could also use llvm-readelf to get equivalent output. For a simple
object, it might look something like this:
C:\Work\TOOLCHAIN-5886> \llvm\build\Debug\bin\llvm-readelf.exe -S
C:\Work\TempWork\bar.o
There are 12 section headers, starting at offset 0x208:
Section Headers:
[Nr] Name Type Address Off Size ES
Flg Lk Inf Al
[ 0] NULL 0000000000000000 000000 000000 00
0 0 0
[ 1] .strtab STRTAB 0000000000000000 000198 000070 00
0 0 1
...
It produces GNU readelf-style output, but this won't show you LMA output
(and there is no option to do so I'm afraid).
Hope that helps,
James
On Tue, 7 Jul 2020 at 18:22, Oza, Hiral via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hello,
>
>
>
> $ objdump -h # displays info about all below sections….
>
> Sections:
>
> Idx Name Size VMA LMA File off
> Algn
>
>
>
> While,
>
> $ llvm-objdump -h # only displays subset of info…
>
> Sections:
>
> Idx Name Size Address Type
>
>
>
> Using ‘--show-lma' could get VMA and LMA details.
>
>
>
> Can you suggest options to print ‘File off’ and ‘Alng’ with llvm-objdump?
>
>
>
> Thank you in advance.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20200708/bf8e5e45/attachment.html>
Thanks James it seems worked for me :) I am facing some issues in login into bugs.llvm.org, I will file once I get access. Pls feel free if you have login :) Thank you again. From: James Henderson <jh7370.2008 at my.bristol.ac.uk> Sent: Wednesday, July 8, 2020 1:58 PM To: Oza, Hiral <Hiral.Oza at netapp.com> Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] llvm-objdump print file offset Hi, This looks like a bug in llvm-objdump's output (I'd expect it to match GNU's). There are no options to print the other columns. Could you file a bug against llvm-objdump at https://bugs.llvm.org/, please? You could also use llvm-readelf to get equivalent output. For a simple object, it might look something like this: C:\Work\TOOLCHAIN-5886> \llvm\build\Debug\bin\llvm-readelf.exe -S C:\Work\TempWork\bar.o There are 12 section headers, starting at offset 0x208: Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 [ 1] .strtab STRTAB 0000000000000000 000198 000070 00 0 0 1 ... It produces GNU readelf-style output, but this won't show you LMA output (and there is no option to do so I'm afraid). Hope that helps, James On Tue, 7 Jul 2020 at 18:22, Oza, Hiral via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Hello, $ objdump -h # displays info about all below sections…. Sections: Idx Name Size VMA LMA File off Algn While, $ llvm-objdump -h # only displays subset of info… Sections: Idx Name Size Address Type Using ‘--show-lma' could get VMA and LMA details. Can you suggest options to print ‘File off’ and ‘Alng’ with llvm-objdump? Thank you in advance. _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200708/2b7292ad/attachment-0001.html>