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]

Re: Help about calculation of addend for ELF relocations for MIPS arch


"Pan ruochen" <panruochen@gmail.com> writes:

> $mips-elf-readelf -s foo.out
>  Num:    Value  Size Type    Bind   Vis      Ndx Name
> ...
>      5: 00000000     0 SECTION LOCAL  DEFAULT    5



> $mips-elf-objdump -h foo.out
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>   0 .text         00002190  c0000000  c0000000  00000034  2**2
>                   CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
>   1 .data         0000105c  c0002190  c0002190  000021c4  2**2
>                   CONTENTS, ALLOC, LOAD, RELOC, DATA
>   2 .bss          00000034  c00031ec  c00031ec  00003220  2**2
>                   ALLOC
>   3 .reginfo      00000018  00000000  00000000  00003220  2**2
>                   CONTENTS, READONLY, LINK_ONCE_SAME_SIZE
>   4 .pdr          000005e0  00000000  00000000  00003238  2**2
>                   CONTENTS, RELOC, READONLY
>   5 .mdebug.abi32 00000000  00000000  00000000  00003818  2**0
>                   CONTENTS, READONLY


You need to show readelf -S foo.out so that we can see which section
is index 5.

It's rather odd that the VMA of the sections in foo.out are not zero.
How did you produce foo.out?

Ian


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