Page MenuHomeFreeBSD

readelf: report all relocation types in rel/rela for MIPS N64
ClosedPublic

Authored by emaste on May 25 2016, 5:22 PM.

Details

Reviewers
brooks
kaiw
Summary

The 64-bit MIPS N64 ABI includes three relocation types in one rel or rela entry.

This is rather ugly, but then so is the MIPS ABI. Open to suggestions for handling this in a cleaner way (or just going ahead with this for now and refactoring later).

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

emaste retitled this revision from to readelf: report all relocation types in rel/rela for MIPS N64.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: kaiw, brooks.

The patch looks good to me. (although I didn't test it with a MIPS N64 object)

kaiw edited edge metadata.

accept patch

This revision is now accepted and ready to land.May 25 2016, 6:07 PM

I don't have a strong opinion how to not stuff MIPS junk into this MI code, but I might suggest making these checks

if (re->ehdr.e_machine == EM_MIPS) {

use a macro or inline function of some sort because I'm going to have to add EM_MIPS_CHERI cases to make them work with CheriABI binaries.