[PATCH] D14281: [ELF2] Sort dynamic symbols according to the MIPS requirements.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 13:29:21 PST 2015


> On x86 dynamic linker fills GOT using R_386_GLOB_DAT relocations. Each
> relocation contains a symbol index and GOT entry address. On MIPS dynamic
> linker fills GOT without relocations. It enumerates GOT entries one by one,
> calculates .dynsym index of the corresponding symbol using the GOT entry
> index and DT_MIPS_xxx tags, and fills the GOT entry by absolute symbol's
> value.

The problem is that it is not "X86 X Mips". It is "Mips X every other
architecture".

>> Other than the hi/lo pairing, do you know what other mips specific
>> logic we will need? I am somewhat uncomfortable with how special mips
>> linking is.
>
>
>  - N64 ABI relocation record format where each rel/rela entry might contain
> three different relocation
> - hi/lo pairing
> - .MIPS.options and .reginfo sections
> - Validate and merging ELF header flags from input objects and write result
> to the linked binary
> - Handling mixed regular/microMIPS symbols where microMIPS symbols marked
> using odd address and special flags in a symbol table
> - Various stubs for cross-calling PIC-nonPIC code, regular/microMIPS code
> etc
> - Multy-GOT support
>
> I am writing this from my iPad, later I will provide more details and links
> to documentation.

Is there any hope of moving mips towards a more mainstream ABI?
Powerpc got a new one recently. I understand that abi transitions are
slow things, but I would really like to see a path forward that
doesn't involve keeping all this mips specific logic forever.

Cheers,
Rafael


More information about the llvm-commits mailing list