Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Nov 2009 09:43:10 GMT
From:      Sebastian Huber <sebastian.huber@embedded-brains.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/140241: Linker set problems on PowerPC EABI
Message-ID:  <200911030943.nA39hA9D081075@www.freebsd.org>
Resent-Message-ID: <200911030950.nA39o1to051209@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140241
>Category:       kern
>Synopsis:       Linker set problems on PowerPC EABI
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 03 09:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Sebastian Huber
>Release:        9-current
>Organization:
embedded brains GmbH
>Environment:
>Description:
On PowerPC with EABI and the usage of the small data area we have a problem with the linker set start and stop declaration (sys/linker_set.h).  Currently GCC assumes that these objects reside in the small data area, which actually is not the case.  You can avoid this if you change the declaration to an array type.
>How-To-Repeat:

>Fix:
Index: sys/linker_set.h
===================================================================
--- sys/linker_set.h    (revision 198848)
+++ sys/linker_set.h    (working copy)
@@ -67,8 +67,8 @@
  * Initialize before referring to a given linker set.
  */
 #define SET_DECLARE(set, ptype)                                                \
-       extern ptype *__CONCAT(__start_set_,set);                       \
-       extern ptype *__CONCAT(__stop_set_,set)
+       extern ptype __CONCAT(__start_set_,set) [];                     \
+       extern ptype __CONCAT(__stop_set_,set) []

 #define SET_BEGIN(set)                                                 \
        (&__CONCAT(__start_set_,set))

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911030943.nA39hA9D081075>