This is an archive of the discontinued LLVM Phabricator instance.

Support HEX_32 when building shared objects
ClosedPublic

Authored by sidneym on Aug 12 2019, 12:40 PM.

Details

Summary

Support HEX_32 when building shared objects.

The following code:

int foo = 10; 
int *b = &foo;

will create a R_HEX_32 relocation and currently will produce the following error:
"ld.lld: error: relocation R_HEX_32 cannot be used against symbol var; recompile with -fPIC"

Hexagon didn't support this when building shared objects. This patch adds the feature and updates the testcase.

Diff Detail

Repository
rL LLVM

Event Timeline

sidneym created this revision.Aug 12 2019, 12:40 PM
bcain accepted this revision.Aug 14 2019, 6:59 AM
This revision is now accepted and ready to land.Aug 14 2019, 6:59 AM
This revision was automatically updated to reflect the committed changes.