diff options
author | Tamar Christina <tamar@zhox.com> | 2022-12-04 15:55:43 +0000 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2023-01-03 23:03:12 +0000 |
commit | 4f9eecf55fb9c10334478859dd87da76481252e9 (patch) | |
tree | 9ce811925327eaf5048ef1d5356a8ca90d548f76 /rts/LinkerInternals.h | |
parent | 14ee7a04efadcd687d87af6c6be3ef2b6e7b63d3 (diff) | |
download | haskell-wip/T22166.tar.gz |
linker: Fix BFD import librarieswip/T22166
This commit fixes the BFD style import library support in the runtime
linker. This was accidentally broken during the refactoring to clang
and went unnoticed because clang itself is unable to generate the BFD
style import libraries.
With this change we can not link against both GCC or Clang produced
libraries again and intermix code produced by both compilers.
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r-- | rts/LinkerInternals.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 8982318b2a..6797095d1e 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -54,11 +54,16 @@ typedef struct _Section Section; */ /* What kind of thing a symbol identifies. We need to know this to determine how - * to process overflowing relocations. See Note [Processing overflowed relocations]. */ + * to process overflowing relocations. See Note [Processing overflowed relocations]. + * This is bitfield however only the option SYM_TYPE_DUP_DISCARD can be combined + * with the other values. */ typedef enum _SymType { - SYM_TYPE_CODE, /* the symbol is a function and can be relocated via a jump island */ - SYM_TYPE_DATA, /* the symbol is data */ - SYM_TYPE_INDIRECT_DATA, /* see Note [_iob_func symbol] */ + SYM_TYPE_CODE = 1 << 0, /* the symbol is a function and can be relocated via a jump island */ + SYM_TYPE_DATA = 1 << 1, /* the symbol is data */ + SYM_TYPE_INDIRECT_DATA = 1 << 2, /* see Note [_iob_func symbol] */ + SYM_TYPE_DUP_DISCARD = 1 << 3, /* the symbol is a symbol in a BFD import library + however if a duplicate is found with a mismatching + SymType then discard this one. */ } SymType; |