summaryrefslogtreecommitdiff
path: root/service_solahart_jakarta_selatan__082122541663/ifunc.mdwn
blob: c357c99c76d1d449bb39b6057b2a4796d4b6dd28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[[!meta copyright="Copyright © 2010, 2011 Free Software Foundation, Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag open_issue_binutils open_issue_gcc open_issue_glibc]]

Needs porting / support in [[/binutils]] and [[/glibc]], and then some target
configure magic for [[/GCC]].

<http://nickclifton.livejournal.com/6612.html> has a short summary about how to
use it from GCC.

  * binutils

    Already passes the ifunc testsuite bits for GAS, but notably for LD
    (`ld/testsuite/ld-ifunc/ifunc.exp`), too, but that one contains a bunch of
    stuff explicitly tailored towards Linux.  For example, we get *OS/ABI: UNIX
    - Linux*.  (This should be fixed through using [[toolchain/ELFOSABI_GNU]].)

    Most of the executables that the testsuite generates don't actually
    execute.  (Though, this is partly due to the [[static
    issue|binutils#static]].)

        $ tmpdir/local_prog 
        ifunc working correctly
        $ tmpdir/static_prog 
        Killed
        $ tmpdir/dynamic_prog 
        tmpdir/dynamic_prog: error while loading shared libraries: ./tmpdir/libshared_ifunc.so: ELF file OS ABI invalid
        $ tmpdir/static_nonifunc_prog 
        Killed
        $ tmpdir/test-1
        tmpdir/test-1: error while loading shared libraries: tmpdir/libshared_ifunc.so: ELF file OS ABI invalid

  * [[glibc]]

      * [[libc_variant_selection]]

  * [[GCC]]

    In `gcc/config.gcc`, set `default_gnu_indirect_function=yes` for us, like
    done for GNU/Linux.  See thread starting at [[!message-id
    "CAFULd4YZsAQ6ckFjXtU5-yyv=3tYQwTJOPhU9zmJxFOrnotj8g@mail.gmail.com"]].