From 079c1b8caed22db2be24f3304c56db56292670e1 Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 3 Jun 2016 21:42:45 +0200 Subject: Use useful names for Symbol Addr and Names in Linker.c Replace `char*` and `void*` with `SymbolName` and `SymbolAddr` in `Linker.c`. Gives some useful information about what the variables are used for and also normalizes the types used in Mac, Linux and Windows Test Plan: ./validate on all platforms that use the runtime linker. For unix platforms please ensure `DYNAMIC_GHC_PROGRAMS=NO` is added to your validate file. This is a continuation from D2184 Reviewers: austin, erikd, simonmar, bgamari Reviewed By: bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2250 GHC Trac Issues: #11816 --- rts/RtsSymbols.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rts/RtsSymbols.h') diff --git a/rts/RtsSymbols.h b/rts/RtsSymbols.h index 10c158c027..00ed590514 100644 --- a/rts/RtsSymbols.h +++ b/rts/RtsSymbols.h @@ -17,9 +17,12 @@ #define MAYBE_LEADING_UNDERSCORE_STR(s) (s) #endif +typedef char* SymbolName; +typedef void* SymbolAddr; + typedef struct _RtsSymbolVal { - const char *lbl; - void *addr; + const SymbolName lbl; + SymbolAddr addr; } RtsSymbolVal; -- cgit v1.2.1