Bug 140241 - [kernel] Linker set problems on PowerPC EABI
Summary: [kernel] Linker set problems on PowerPC EABI
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: powerpc (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ppc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 09:50 UTC by sebastian.huber
Modified: 2024-12-24 16:03 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sebastian.huber 2009-11-03 09:50:01 UTC
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.

Fix: 

#define SET_BEGIN(set)                                                 \
        (&__CONCAT(__start_set_,set))--vHccJU8OXTJnxbAT2U288aHwScwd3A5JT0Fyf0Q0QfgtagUT
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

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) []
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-11-03 14:05:43 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ppc

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:43 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:38:54 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>