X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FLinkerInternals.h;h=d545c12ed959bd499e9d0c3594c671c166d4008d;hb=cd47700887365ca2a6af17d03e731efce65cf2ac;hp=07d6334c7f4fab7d3299c6548cf9824c1f1a28ea;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 07d6334..d545c12 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -42,14 +42,19 @@ typedef /* Jump Islands are sniplets of machine code required for relative * address relocations on the PowerPC. */ -#ifdef powerpc_HOST_ARCH typedef struct { - short lis_r12, hi_addr; - short ori_r12_r12, lo_addr; - long mtctr_r12; - long bctr; -} ppcJumpIsland; +#ifdef powerpc_HOST_ARCH + struct { + short lis_r12, hi_addr; + short ori_r12_r12, lo_addr; + long mtctr_r12; + long bctr; + } jumpIsland; +#elif x86_64_HOST_ARCH + uint64_t addr; + uint8_t jumpIsland[6]; #endif +} SymbolExtra; /* Top-level structure for an object module. One of these is allocated * for each object file in use. @@ -60,6 +65,11 @@ typedef struct _ObjectCode { int fileSize; char* formatName; /* eg "ELF32", "DLL", "COFF", etc. */ + /* If this object is a member of an archive, archiveMemberName is + * like "libarchive.a(object.o)". Otherwise it's NULL. + */ + char* archiveMemberName; + /* An array containing ptrs to all the symbol names copied from this object into the global symbol hash table. This is so that we know which parts of the latter mapping to nuke when this @@ -80,9 +90,6 @@ typedef struct _ObjectCode { list. */ Section* sections; - /* A private hash table for local symbols. */ - HashTable* lochash; - /* Allow a chain of these things */ struct _ObjectCode * next; @@ -97,14 +104,22 @@ typedef struct _ObjectCode { unsigned int pltIndex; #endif -#ifdef powerpc_HOST_ARCH - ppcJumpIsland *jump_islands; - unsigned long island_start_symbol; - unsigned long n_islands; +#if powerpc_HOST_ARCH || x86_64_HOST_ARCH + SymbolExtra *symbol_extras; + unsigned long first_symbol_extra; + unsigned long n_symbol_extras; #endif } ObjectCode; +#define OC_INFORMATIVE_FILENAME(OC) \ + ( (OC)->archiveMemberName ? \ + (OC)->archiveMemberName : \ + (OC)->fileName \ + ) + extern ObjectCode *objects; +void exitLinker( void ); + #endif /* LINKERINTERNALS_H */