This is an archive of the discontinued LLVM Phabricator instance.

unwind: Export _Unwind_{Get,Set}{GR,IP}() for ARM EHABI.
AbandonedPublic

Authored by logan on Jul 14 2015, 12:14 PM.

Details

Summary

I have removed the exported symbols of _Unwind_{Get,Set}{GR,IP}()
from libunwind.so in D11190. However, it is debatable whether we should
export those symbols. Thus, I am uploading this patch for discussion.

Arguments for this patch:

  • The programs that do not include <unwind.h> and declares their own function declarations can still be linked with our libunwind.so.
  • _Unwind_{Get,Set}{GR,IP}() are listed in C++ Itanium Level 1 unwinding API.

Arguments against this patch:

  • libgcc does not provide these symbols at all. We should not extend the ABI without deliberate consideration.
  • Programs that didn't include <unwind.h> deserves not being compiled. If the application developers have tried to port their code to ARM, they should already found the problem.
  • ARM EHABI only specified _Unwind_VRS_{Get,Set}() for such purpose.

I personally against this patch, but I would like to see if there are other
comments/concerns.

Depends on D11190

Diff Detail

Event Timeline

logan updated this revision to Diff 29696.Jul 14 2015, 12:14 PM
logan retitled this revision from to unwind: Export _Unwind_{Get,Set}{GR,IP}() for ARM EHABI..
logan updated this object.
logan added reviewers: rengolin, joerg, danalbert, asl, compnerd.
logan added a subscriber: cfe-commits.
compnerd added inline comments.Jul 17 2015, 2:14 PM
include/unwind.h
217

The double negative hurts. Would you be opposed to switching this around so that we can have:

__LIBUWNIND_INLINE_LEVEL1
logan added inline comments.Jul 18 2015, 8:53 AM
include/unwind.h
217

How about changing this to:

#if defined(__LIBUNWIND_UNWIND_LEVEL1_EXTERNAL_LINKAGE
#define __LIBUNWIND_EXPORT_UNWIND_LEVEL1 extern
#else
#define __LIBUNWIND_EXPORT_UNWIND_LEVEL1 static __inline__
#endif

My intuition is to make sure that these functions are inlined by default, i.e. other files can get the inlined version without any extra #defines.

compnerd edited edge metadata.Jul 20 2015, 4:29 PM

Sure that would be fine too.

logan abandoned this revision.Jul 21 2015, 4:54 PM

Stashing the change with D11190.