Project

General

Profile

Feature #10366

ld(1) should support GNU-style linker sets

Added by Rich Lowe 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
2019-02-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

GNU ld as a feature whereby undefined references of the form _start<section name> or _stop<section name> are satisfied by the link-editor with local symbols pointing to the start and end of the mentioned section.

FreeBSD and others use this via sys/linker_set.h to create easily iterable arrays the definition of which spans multiple files (they put pointers into a section, and then use these symbols to iterate the whole section).

loader, bhyve, and other code would benefit from us supporting this too.

History

#1

Updated by Rich Lowe 3 months ago

testing: Test suite additions, Hans testing bhyve both userland and kernel, Toomas testing loader

#2

Updated by Electric Monk 3 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit b6a0e2cd4ce8d91fe9dc750c44e662d7c7e5fb8e

commit  b6a0e2cd4ce8d91fe9dc750c44e662d7c7e5fb8e
Author: Richard Lowe <richlowe@richlowe.net>
Date:   2019-04-24T16:59:38.000Z

    10366 ld(1) should support GNU-style linker sets
    10581 ld(1) should know kernel modules are a thing
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF