Page MenuHomePhabricator

[mips][micromips] Fix values in .gcc_except_table for -fPIC
ClosedPublic

Authored by abeserminji on Feb 4 2019, 2:54 AM.

Details

Summary

When a landing pad is calculated in a program that is compiled
for micromips with -fPIC flag, it will point to an even address.
Such an error will cause a segmentation fault, as the instructions
in micromips are aligned on odd addresses. This patch sets the
last bit of the offset where a landing pad is, to 1, which will
effectively be an odd address and point to the instruction exactly.

Patch D52985 fixed this issue for -static compilation.

Diff Detail

Repository
rL LLVM

Event Timeline

abeserminji created this revision.Feb 4 2019, 2:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2019, 2:54 AM
This revision is now accepted and ready to land.Feb 6 2019, 2:11 PM
This revision was automatically updated to reflect the committed changes.