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: MIPS16 text labels


"Fu, Chao-Ying" <fu@mips.com> writes:

>   The MIPS16 text labels are stored as odd addresses in "tc-mips.c".
> Does anyone know the reason of storing odd addresses?

It's so that if you do
    .word FN
where FN is a MIPS16 symbol, the right thing happens when that value
is loaded into the PC.

Besides the code in the assembler, see _bfd_mips_elf_add_symbol_hook
and _bfd_mips_elf_link_output_symbol_hook in bfd/elfxx-mips.c.

Ian


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