Libgcc_s.so: undefined link to ` __stack_chk_fail@GLIBC _2.4 '

At first I warn that I / m is not a programmer, but only an administrator. I am trying to understand some actions.

When I installed the program made by Oracle, I received a log message:

/usr/bin/make -f ins_precomp.mk relink ORACLE_HOME=/u01/oracle/OraHome_1 EXENAME=proc/Linking /u01/oracle/OraHome_1/precomp/lib/proc
libgcc_s.so: undefined reference to
/usr/bin/make -f ins_precomp.mk relink ORACLE_HOME=/u01/oracle/OraHome_1 EXENAME=proc/Linking /u01/oracle/OraHome_1/precomp/lib/proc
libgcc_s.so: undefined reference to
__ stack_chk_fail @ GLIBC_2.4``

ls -l
../libgcc_s.so -> /lib/libgcc_s.so.1

so I tried to diagnose:

objdump -T / lib / libgcc_s.so.1 | grep __stack_chk_fail
00000000 DF *UND* 00000000 GLIBC_2.4 __stack_chk_fail

and

ldd / lib / libgcc_s.so.1.ORG
linux-gate.so.1 => (0x00fc5000)
libc.so.6 => /lib/libc.so.6 (0x00110000)
/lib/ld-linux.so.2 (0x00b39000)

and

objdump -T / lib / libc.so.6 | grep __stack_chk_fail
00c52f80 g DF .text 0000001a GLIBC_2.4 __stack_chk_fail

1) I do not know why this problem occurred if all the characters are inside shared libraries (mabye is not, please correct me or how to check it)

when I put the older library libgcc_s.so.1 without the __stack_chk_fail symbol

objdump -T / lib / libgcc_s.so.1 | grep __stack_chk_fail
empty output

everything was fine

2) Does the linker not check the link to __stack_chk_fail, because in this case there isn’t inside libgcc_s.so.1?

+4
source share
2 answers

The problem is this:

libgcc_s.so has a dependency on libc.so.6. This issue starts with glibc 2.4.

You must add -lc to the link line.

This question will give you more information. On Linux, stubs are used for standard libraries. Why are stubs required?

+4
source

*UND* at 00000000 DF *UND* 00000000 GLIBC_2.4 __stack_chk_fail indicates that the section is referenced but not defined. So yes, you are missing a character.

+2
source

Source: https://habr.com/ru/post/1340955/


All Articles