* Committed, MMIX: gas: check the weakness of a symbol when relaxing
@ 2002-03-14 2:06 Hans-Peter Nilsson
2002-03-17 14:51 ` 2.12: " Hans-Peter Nilsson
0 siblings, 1 reply; 2+ messages in thread
From: Hans-Peter Nilsson @ 2002-03-14 2:06 UTC (permalink / raw)
To: binutils
Doh!
gas:
* config/tc-mmix.c (md_estimate_size_before_relax): Don't consider
a weak symbol in same section to be within reach.
gas/testsuite:
* gas/mmix/weak1.d, gas/mmix/weak1.d: New test.
Index: tc-mmix.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mmix.c,v
retrieving revision 1.5
diff -p -c -r1.5 tc-mmix.c
*** tc-mmix.c 2002/02/04 04:03:15 1.5
--- tc-mmix.c 2002/03/14 09:53:39
*************** md_estimate_size_before_relax (fragP, se
*** 2172,2178 ****
#define HANDLE_RELAXABLE(state) \
case ENCODE_RELAX (state, STATE_UNDF): \
if (fragP->fr_symbol != NULL \
! && S_GET_SEGMENT (fragP->fr_symbol) == segment) \
{ \
/* The symbol lies in the same segment - a relaxable case. */ \
fragP->fr_subtype \
--- 2172,2179 ----
#define HANDLE_RELAXABLE(state) \
case ENCODE_RELAX (state, STATE_UNDF): \
if (fragP->fr_symbol != NULL \
! && S_GET_SEGMENT (fragP->fr_symbol) == segment \
! && !S_IS_WEAK (fragP->fr_symbol)) \
{ \
/* The symbol lies in the same segment - a relaxable case. */ \
fragP->fr_subtype \
*** /dev/null Tue Jan 1 05:00:00 1980
--- weak1.s Thu Mar 14 10:50:40 2002
***************
*** 0 ****
--- 1,7 ----
+ .weak foo
+ foo:
+ POP 1,0
+ .global main
+ main:
+ PUSHJ $15,foo
+ .quad foo
*** /dev/null Tue Jan 1 05:00:00 1980
--- weak1.d Thu Mar 14 10:48:51 2002
***************
*** 0 ****
--- 1,23 ----
+ #as: -x
+ #objdump: -str
+
+ # Relaxation thought a weak symbol was within reach.
+
+ .*: file format elf64-mmix
+
+ SYMBOL TABLE:
+ 0+ l d \.text 0+
+ 0+ l d \.data 0+
+ 0+ l d \.bss 0+
+ 0+ w \.text 0+ foo
+ 0+4 g \.text 0+ main
+
+ RELOCATION RECORDS FOR \[\.text\]:
+ OFFSET TYPE VALUE
+ 0+18 R_MMIX_64 foo
+ 0+4 R_MMIX_PUSHJ foo
+
+ Contents of section \.text:
+ 0000 f8010000 f20f0000 fd000000 fd000000 .*
+ 0010 fd000000 fd000000 00000000 00000000 .*
+ Contents of section \.data:
brgds, H-P
^ permalink raw reply [flat|nested] 2+ messages in thread
* 2.12: Re: Committed, MMIX: gas: check the weakness of a symbol when relaxing
2002-03-14 2:06 Committed, MMIX: gas: check the weakness of a symbol when relaxing Hans-Peter Nilsson
@ 2002-03-17 14:51 ` Hans-Peter Nilsson
0 siblings, 0 replies; 2+ messages in thread
From: Hans-Peter Nilsson @ 2002-03-17 14:51 UTC (permalink / raw)
To: binutils
On Thu, 14 Mar 2002, Hans-Peter Nilsson wrote:
> gas:
> * config/tc-mmix.c (md_estimate_size_before_relax): Don't consider
> a weak symbol in same section to be within reach.
>
> gas/testsuite:
> * gas/mmix/weak1.d, gas/mmix/weak1.d: New test.
Now on 2.12 too.
brgds, H-P
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-17 22:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-14 2:06 Committed, MMIX: gas: check the weakness of a symbol when relaxing Hans-Peter Nilsson
2002-03-17 14:51 ` 2.12: " Hans-Peter Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).