diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2016-11-29 15:12:02 +0100 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-11-29 06:12:02 -0800 |
commit | a60661ea96f6760d6cfd8e1e86c370f7e7052ed0 (patch) | |
tree | 0d796352c2da7cbe4267b80104542dc12dc6d95e /src/pal | |
parent | 6c870a3e37bead1aecf2fa898fcefbefd8e7543a (diff) | |
download | coreclr-a60661ea96f6760d6cfd8e1e86c370f7e7052ed0.tar.gz coreclr-a60661ea96f6760d6cfd8e1e86c370f7e7052ed0.tar.bz2 coreclr-a60661ea96f6760d6cfd8e1e86c370f7e7052ed0.zip |
Fix phantom TEXTREL in libcoreclr.so (#8347)
This change fixes the problem where scanelf tool reported that libcoreclr.s
contains TEXTRELs, however it was unable to find any.
It turns out there actually were TEXTRELs, but not in the program code or
program data, but rather in the DWARF tables. The NESTED_ENTRY macro for
ARM64 and AMD64 uses .cfi_personality with encoding 0, which means
absolute address. This is the source of the TEXTREL.
Changing the encoding to 0x1b - DW_EH_PE_pcrel | DW_EH_PE_sdata4 fixes the
problem - the scanelf tool no longer reports any TEXTRELs in libcoreclr.so.
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/inc/unixasmmacrosamd64.inc | 2 | ||||
-rw-r--r-- | src/pal/inc/unixasmmacrosarm64.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pal/inc/unixasmmacrosamd64.inc b/src/pal/inc/unixasmmacrosamd64.inc index f221b4406b..c3321ce598 100644 --- a/src/pal/inc/unixasmmacrosamd64.inc +++ b/src/pal/inc/unixasmmacrosamd64.inc @@ -8,7 +8,7 @@ #if defined(__APPLE__) .cfi_personality 0x9b, C_FUNC(\Handler) // 0x9b == DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4 #else - .cfi_personality 0, C_FUNC(\Handler) // 0 == DW_EH_PE_absptr + .cfi_personality 0x1b, C_FUNC(\Handler) // 0x1b == DW_EH_PE_pcrel | DW_EH_PE_sdata4 #endif .endif .endm diff --git a/src/pal/inc/unixasmmacrosarm64.inc b/src/pal/inc/unixasmmacrosarm64.inc index ae60db4d35..60142053b0 100644 --- a/src/pal/inc/unixasmmacrosarm64.inc +++ b/src/pal/inc/unixasmmacrosarm64.inc @@ -5,7 +5,7 @@ .macro NESTED_ENTRY Name, Section, Handler LEAF_ENTRY \Name, \Section .ifnc \Handler, NoHandler - .cfi_personality 0, C_FUNC(\Handler) // 0 == DW_EH_PE_absptr + .cfi_personality 0x1b, C_FUNC(\Handler) // 0x1b == DW_EH_PE_pcrel | DW_EH_PE_sdata4 .endif .endm |