diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-11-10 15:21:38 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-11-10 15:25:40 -0500 |
commit | aa10c67ec5b9cea9d89ecac88f3a22ec873439c2 (patch) | |
tree | 354ec7c101582169583cd5d6d686cf93bc76082b /rts/LinkerInternals.h | |
parent | 122d826d1d1b7ba6e73866331863fa1e0b3e99ea (diff) | |
download | haskell-aa10c67ec5b9cea9d89ecac88f3a22ec873439c2.tar.gz |
rts/linker: Move loadArchive to new source file
Test Plan: Validate
Reviewers: DemiMarie, austin, simonmar, erikd
Reviewed By: DemiMarie
Subscribers: Phyx, thomie, hvr
Differential Revision: https://phabricator.haskell.org/D2642
GHC Trac Issues: #12388
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r-- | rts/LinkerInternals.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 47e0375a2c..1093435cb3 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -261,4 +261,36 @@ extern /*Str*/HashTable *symhash; #include "EndPrivate.h" +HsInt isAlreadyLoaded( pathchar *path ); +HsInt loadOc( ObjectCode* oc ); +ObjectCode* mkOc( pathchar *path, char *image, int imageSize, + rtsBool mapped, char *archiveMemberName, + int misalignment + ); + +#ifdef darwin_HOST_OS +int machoGetMisalignment( FILE * f ); +#endif /* darwin_HOST_OS */ + +#if defined (mingw32_HOST_OS) +/* We use myindex to calculate array addresses, rather than + simply doing the normal subscript thing. That's because + some of the above structs have sizes which are not + a whole number of words. GCC rounds their sizes up to a + whole number of words, which means that the address calcs + arising from using normal C indexing or pointer arithmetic + are just plain wrong. Sigh. +*/ +STATIC_INLINE UChar * +myindex ( int scale, void* base, int index ) +{ + return + ((UChar*)base) + scale * index; +} + +char *cstring_from_section_name( + UChar* name, + UChar* strtab); +#endif /* mingw32_HOST_OS */ + #endif /* LINKERINTERNALS_H */ |