public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: .previous
@ 1999-12-22 11:45 Nick Clifton
  1999-12-22 12:04 ` .previous Philip Blundell
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 1999-12-22 11:45 UTC (permalink / raw)
  To: pb; +Cc: binutils

Hi Philip,

: 1999-12-20  Philip Blundell  <pb@futuretv.com>
: 
: 	* config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate
: 	hook function when changing sections.
: 	(arm_s_data): Likewise.

This patch is fine.  I have applied it to the sources.

: Also, as far as I can tell, no ELF target accepts that construct
: with `.bss' instead of `.data', because the necessary hooks are
: missing altogether.

Is this a feature that you need ?

Cheers
	Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: .previous
  1999-12-22 11:45 .previous Nick Clifton
@ 1999-12-22 12:04 ` Philip Blundell
  0 siblings, 0 replies; 4+ messages in thread
From: Philip Blundell @ 1999-12-22 12:04 UTC (permalink / raw)
  To: Nick Clifton; +Cc: pb, binutils

>: Also, as far as I can tell, no ELF target accepts that construct
>: with `.bss' instead of `.data', because the necessary hooks are
>: missing altogether.
>
>Is this a feature that you need ?

Not exactly "need".  I came across a situation the other day when it would 
have been nice to have, but I managed fine without.

p.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: .previous
@ 1999-12-22 12:09 Nick Clifton
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Clifton @ 1999-12-22 12:09 UTC (permalink / raw)
  To: Philip.Blundell; +Cc: pb, binutils

Hi Philip,

: Not exactly "need".  I came across a situation the other day when it
: would have been nice to have, but I managed fine without.

Ok - I won't worry about it then.  Of course if you ever care to
implement it then I will be happy to look at the patch.. ;-)

Cheers
	Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* .previous
@ 1999-12-20  6:11 Philip Blundell
  0 siblings, 0 replies; 4+ messages in thread
From: Philip Blundell @ 1999-12-20  6:11 UTC (permalink / raw)
  To: binutils

On an ARM ELF target, GAS does not currently accept:

	.data
	.word 0
	.previous

The reason is that tc-arm.c has its own hooks for .data and .text; these 
override the ones in obj-elf.c and so the code to store the old sections never 
gets called.  The patch below seems to fix this for me.

Also, as far as I can tell, no ELF target accepts that construct with `.bss' 
instead of `.data', because the necessary hooks are missing altogether.

Thanks

p.

1999-12-20  Philip Blundell  <pb@futuretv.com>

	* config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate
	hook function when changing sections.
	(arm_s_data): Likewise.

Index: tc-arm.c
===================================================================
RCS file: /cvs/binutils/binutils/gas/config/tc-arm.c,v
retrieving revision 1.25
diff -u -r1.25 tc-arm.c
--- tc-arm.c	1999/10/28 03:03:53	1.25
+++ tc-arm.c	1999/12/20 14:09:31
@@ -1373,7 +1373,11 @@
   if (now_seg != text_section)
     s_ltorg (0);
   
+#ifdef OBJ_ELF
+  obj_elf_text (ignore);
+#else
   s_text (ignore);
+#endif
 }
 
 static void
@@ -1388,7 +1392,11 @@
   else if (now_seg != data_section)
     s_ltorg (0);
   
+#ifdef OBJ_ELF
+  obj_elf_data (ignore);
+#else
   s_data (ignore);
+#endif
 }
 
 #ifdef OBJ_ELF


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-12-22 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-22 11:45 .previous Nick Clifton
1999-12-22 12:04 ` .previous Philip Blundell
  -- strict thread matches above, loose matches on Subject: below --
1999-12-22 12:09 .previous Nick Clifton
1999-12-20  6:11 .previous Philip Blundell

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).