kern/140241: Linker set problems on PowerPC EABI

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 3 09:50:01 UTC 2009


>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:


More information about the freebsd-bugs mailing list