HomePhabricator

[mips][micromips] Fix how values in .gcc_except_table are calculated
Audit RequiredrL353480

Description

[mips][micromips] Fix how values in .gcc_except_table are calculated

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.

r344591 fixed this issue for -static compilation.

Patch by Aleksandar Beserminji.

Differential Revision: https://reviews.llvm.org/D57677

Details

Auditors
grosbach
Committed
petarjFeb 7 2019, 2:57 PM
Differential Revision
D57677: [mips][micromips] Fix values in .gcc_except_table for -fPIC
Parents
rL353479: bpf: teach BPF driver about the new CPU "v3"
Branches
Unknown
Tags
Unknown