Bug 5391 - ld does not produce magic symbols with names like __start_* and __stop_*,
Summary: ld does not produce magic symbols with names like __start_* and __stop_*,
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-21 13:48 UTC by Petr.Salinger
Modified: 2007-11-21 21:45 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr.Salinger 2007-11-21 13:48:44 UTC
The previous versions of ld used to produce symbols __start_foo and __stop_foo
visible in "readelf -a a.out" output for following snippet:

        .text
        .globl  _start
        .type   _start,@function
        .section "foo"
_start:
        ret

This does not work anymore, it breaks building of kernel modules in FreeBSD.

Petr
Comment 1 Alan Modra 2007-11-21 21:45:18 UTC
Since 2007-03-24, ld has only provided these symbols if they are referenced.  So
you'll need some reference in an object file or via -u on the command line if
you want to see them.