public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Put __dso_handle in .sdata/.sbss on ia64
@ 2019-06-02  0:30 James Clarke
  2019-06-05 22:28 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: James Clarke @ 2019-06-02  0:30 UTC (permalink / raw)
  To: gcc-patches; +Cc: James Clarke

The symbol is exposed to C by dso_handle.h, and since it's a single
8-byte pointer, it is just within the threshold for being in the small
data (or bss) section, so code accessing it will use GP-relative
addressing. Therefore we must put it in .sdata/.sbss in case our other
data sections grow too big and we overflow the 22-bit relocation.

libgcc/
	* config/ia64/crtbegin.S (__dso_handle): Put in .sdata/.sbss
	rather than .data/.bss so it can be accessed via gp-relative
	addressing.
---
 libgcc/config/ia64/crtbegin.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgcc/config/ia64/crtbegin.S b/libgcc/config/ia64/crtbegin.S
index 5b2f55936dd..213ccd7ab8b 100644
--- a/libgcc/config/ia64/crtbegin.S
+++ b/libgcc/config/ia64/crtbegin.S
@@ -45,11 +45,11 @@ dtor_ptr:
 	.type __dso_handle,@object
 	.size __dso_handle,8
 #ifdef SHARED
-	.section .data
+	.section .sdata
 __dso_handle:
 	data8	__dso_handle
 #else
-	.section .bss
+	.section .sbss
 	.align 8
 __dso_handle:
 	.skip	8
-- 
2.20.1

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

* Re: [PATCH] Put __dso_handle in .sdata/.sbss on ia64
  2019-06-02  0:30 [PATCH] Put __dso_handle in .sdata/.sbss on ia64 James Clarke
@ 2019-06-05 22:28 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2019-06-05 22:28 UTC (permalink / raw)
  To: James Clarke, gcc-patches

On 6/1/19 6:30 PM, James Clarke wrote:
> The symbol is exposed to C by dso_handle.h, and since it's a single
> 8-byte pointer, it is just within the threshold for being in the small
> data (or bss) section, so code accessing it will use GP-relative
> addressing. Therefore we must put it in .sdata/.sbss in case our other
> data sections grow too big and we overflow the 22-bit relocation.
> 
> libgcc/
> 	* config/ia64/crtbegin.S (__dso_handle): Put in .sdata/.sbss
> 	rather than .data/.bss so it can be accessed via gp-relative
> 	addressing.
THanks.  Ive installed this on the trunk.

jeff

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

end of thread, other threads:[~2019-06-05 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-02  0:30 [PATCH] Put __dso_handle in .sdata/.sbss on ia64 James Clarke
2019-06-05 22:28 ` Jeff Law

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