kern/140241: Linker set problems on PowerPC EABI

View: New views
1 Messages — Rating Filter:   Alert me  

kern/140241: Linker set problems on PowerPC EABI

by Sebastian Huber-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>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:
_______________________________________________
freebsd-bugs@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@..."