gcc/ld - create a new libc.so with __isoc99_sscanf@@GLIBC_2.7 symbol from glibc.2.6

前端 未结 2 1100
自闭症患者
自闭症患者 2020-12-15 13:18

I have an application, which does a error when I try to run it:

/lib/libc.so.6: version `GLIBC_2.7\' not found

But the only symbol it needs

2条回答
  •  感情败类
    2020-12-15 14:14

    Your second version works with this script:

    GLIBC_2.7 {
     global: __isoc99_sscanf;
     local: *;
    };
    

    Using -Wl,--version-script=script.txt, however, I don't know how to access the original sscanf@GLIBC_2.4.

    Anyway, perhaps you would want to use -D_GNU_SOURCE instead; to avoid __isoc99_sscanf altogether.

提交回复
热议问题