diff options
author | Timothy Wall <twall@alum.mit.edu> | 2001-11-13 14:22:53 +0000 |
---|---|---|
committer | Timothy Wall <twall@alum.mit.edu> | 2001-11-13 14:22:53 +0000 |
commit | 6e9179034707f18294ae1cbebcc7e9714a46951d (patch) | |
tree | 85f85a20b4ea7e4ff949b0703aae7c42bc8ed6b7 /gas/write.c | |
parent | 1a78a35acfb696d2262b7c2d707b9e6421c99aaa (diff) | |
download | gdb-6e9179034707f18294ae1cbebcc7e9714a46951d.zip gdb-6e9179034707f18294ae1cbebcc7e9714a46951d.tar.gz gdb-6e9179034707f18294ae1cbebcc7e9714a46951d.tar.bz2 |
Fix tic54x testsuite failures and Lmem disassembly bugs.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c index 171ad63..7022015 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2430,7 +2430,12 @@ relax_segment (segment_frag_root, segment) know (!(S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE) || (symbolP->sy_frag == &zero_address_frag)); #endif - target += S_GET_VALUE (symbolP); + /* Convert from an actual address to an octet offset + into the section. Here it is assumed that the + section's VMA is zero, and can omit subtracting it + from the symbol's value to get the address offset. */ + know (S_GET_SECTION (symbolP)->vma == 0); + target += S_GET_VALUE (symbolP) * OCTETS_PER_BYTE; } know (fragP->fr_next); |