mips r6 relocations

3 views
Skip to first unread message

composerguy

unread,
Mar 26, 2015, 4:59:33 PM3/26/15
to mcli...@googlegroups.com
I work at Imagination/Mips.

I've been tasked to add the r6 relocations for mips32 and mips64.

One thing I need to do is to check that the user is not mixing .o files for non r6 and for r6.

There is information in the .o file header that determines this.

Any thoughts of the based way to check for this consistency?

I have several ideas of where this can go but those from the core developers are likely
to know best where it goes.

Tia.

Reed 

reed kotler

unread,
Mar 27, 2015, 6:24:21 PM3/27/15
to mcli...@googlegroups.com
There does not seem to be any checking for any of the mclinker targets to make sure the the .o files are consistent with the target triple.

There is also no way to do consistency checking or to look at the e_flags from the ELF_hdr section

--
You received this message because you are subscribed to the Google Groups "MCLinker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mclinker+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pete Chou

unread,
Mar 29, 2015, 10:14:27 PM3/29/15
to reed kotler, mcli...@googlegroups.com
Hi Reed,

If linking against object files that are different with the target triple, a warning of incompatible format would be issued and those object files would not be included in the linking.

Please check ELFObjectReader::isMyFormat() in lib/LD/ELFObjectReader.cpp. In this function, some elf attributes such as type, endian, machine are checked. You may add checking for flags here.

Thanks,
Pete

reed kotler

unread,
Mar 30, 2015, 2:40:33 PM3/30/15
to Pete Chou, mcli...@googlegroups.com
I did not hear back so I had started to make the change by a virtual MergeFlags method to GNULDBackend and then overriding this method in MipsGNULDBackend.

The isMyFormat seems to have a different purpose; i.e. checking that the object type is recognized.
Reply all
Reply to author
Forward
0 new messages