From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 25 Nov 2004 08:46:12 -1000 From: Tim Newsham To: 9fans@cse.psu.edu Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] linker bug Topicbox-Message-UUID: 0cafe19a-eace-11e9-9e20-41e7f4b1d025 There appears to be a bug in the linker (at least in kl) when using the -R flag. When I specify a value of -R0x4 everything seems to work fine. If I specify larger values such as -R0x10, then occasionally (depending on the size of the text region, I presume) the emitted binary is incorrect. For example, if I have an initialized variable: static int x = 0x12345678; then the address of x (in the symbol table and as referenced by the instructions) will not line up with the initialized word that contains the value 0x12345678. I've stopped using the flag in this way (turns out I didnt need it after all), so I haven't tracked down the bug any further, but thought I'd mention it before it bites someone else. Tim N.