SIGSEGV while loading shared lib

I have a simple prog doing nothing than printf().

its common.mk makes a reference to a shared lib of mine
(libgesecr.so0.0.1) but no symbols are referenced in the source.

When the prog starts, I get:
load_object: attempt load of libgesecr.so.0.1
load_elf32: loaded lib at addr b8200000(text) b82193e0(data)
load_object: attempt load of libDataServer_API.so.2.0
load_elf32: loaded lib at addr b821b000(text) b82204d0(data)
load_object: attempt load of libm.so.2
load_elf32: loaded lib at addr b034e000(text) b035de48(data)
load_object: attempt load of libRieter_misc.so.1.8
load_elf32: loaded lib at addr b8222000(text) b8225f1c(data)
segmentation violation (core dumped)

None of the referenced libs cause some errors except when libgesecr.so
is here.

I suppose there is something wrong with some declared symbols but I
didn’t see anything relevant with objdump.

All libs are built with standard QNX makefiles.

Any idea to find the problem?

Thanks,
Alain.

Did you build the libraries as PIC?


Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3D3D84BE.5050501@icbt.com

I have a simple prog doing nothing than printf().

its common.mk makes a reference to a shared lib of mine
(libgesecr.so0.0.1) but no symbols are referenced in the source.

When the prog starts, I get:
load_object: attempt load of libgesecr.so.0.1
load_elf32: loaded lib at addr b8200000(text) b82193e0(data)
load_object: attempt load of libDataServer_API.so.2.0
load_elf32: loaded lib at addr b821b000(text) b82204d0(data)
load_object: attempt load of libm.so.2
load_elf32: loaded lib at addr b034e000(text) b035de48(data)
load_object: attempt load of libRieter_misc.so.1.8
load_elf32: loaded lib at addr b8222000(text) b8225f1c(data)
segmentation violation (core dumped)

None of the referenced libs cause some errors except when libgesecr.so
is here.

I suppose there is something wrong with some declared symbols but I
didn’t see anything relevant with objdump.

All libs are built with standard QNX makefiles.

Any idea to find the problem?

Thanks,
Alain.

I found the problem.
In fact, the linker looks for libncurses in the local directory, then in
/x86/lib, /x86/usr/lib, etc.
The library libncurses.so.5.0 is in /x86/usr/lib, but the link
libncurses.so in only in /usr/lib. I don’t know why, certainly a problem
in the package I made.
So, ld didn’t find libncurse.so but found libncurses.a and used it.
Don’t really know why a sigsegv. Maybe you could make it more clear for me?

Thanks,
Alain.


Adam Mallory wrote:

Did you build the libraries as PIC?


Cheers,
Adam

QNX Software Systems Ltd.
[ > amallory@qnx.com > ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <> pschon@baste.magibox.net
“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3D3D84BE.5050501@icbt.com> …

I have a simple prog doing nothing than printf().

its common.mk makes a reference to a shared lib of mine
(libgesecr.so0.0.1) but no symbols are referenced in the source.

When the prog starts, I get:
load_object: attempt load of libgesecr.so.0.1
load_elf32: loaded lib at addr b8200000(text) b82193e0(data)
load_object: attempt load of libDataServer_API.so.2.0
load_elf32: loaded lib at addr b821b000(text) b82204d0(data)
load_object: attempt load of libm.so.2
load_elf32: loaded lib at addr b034e000(text) b035de48(data)
load_object: attempt load of libRieter_misc.so.1.8
load_elf32: loaded lib at addr b8222000(text) b8225f1c(data)
segmentation violation (core dumped)

None of the referenced libs cause some errors except when libgesecr.so
is here.

I suppose there is something wrong with some declared symbols but I
didn’t see anything relevant with objdump.

All libs are built with standard QNX makefiles.

Any idea to find the problem?

Thanks,
Alain.

I’m not sure that it would use libncurses.a, since it’s a static (archive)
lib. Execute your program as:

DL_DEBUG=1 ./myapp

and double check where it’s pulling the libraries, and which ones (post
that). Also, post an objdump -x and list the lib’s needed. What
address is it SIGSEGV’ing on?

\

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>
“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3D4629D4.8070000@icbt.com

I found the problem.
In fact, the linker looks for libncurses in the local directory, then in
/x86/lib, /x86/usr/lib, etc.
The library libncurses.so.5.0 is in /x86/usr/lib, but the link
libncurses.so in only in /usr/lib. I don’t know why, certainly a problem
in the package I made.
So, ld didn’t find libncurse.so but found libncurses.a and used it.
Don’t really know why a sigsegv. Maybe you could make it more clear for
me?

Thanks,
Alain.


Adam Mallory wrote:

Did you build the libraries as PIC?


Cheers,
Adam

QNX Software Systems Ltd.
[ > amallory@qnx.com > ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <> pschon@baste.magibox.net
“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3D3D84BE.5050501@icbt.com> …

I have a simple prog doing nothing than printf().

its common.mk makes a reference to a shared lib of mine
(libgesecr.so0.0.1) but no symbols are referenced in the source.

When the prog starts, I get:
load_object: attempt load of libgesecr.so.0.1
load_elf32: loaded lib at addr b8200000(text) b82193e0(data)
load_object: attempt load of libDataServer_API.so.2.0
load_elf32: loaded lib at addr b821b000(text) b82204d0(data)
load_object: attempt load of libm.so.2
load_elf32: loaded lib at addr b034e000(text) b035de48(data)
load_object: attempt load of libRieter_misc.so.1.8
load_elf32: loaded lib at addr b8222000(text) b8225f1c(data)
segmentation violation (core dumped)

None of the referenced libs cause some errors except when libgesecr.so
is here.

I suppose there is something wrong with some declared symbols but I
didn’t see anything relevant with objdump.

All libs are built with standard QNX makefiles.

Any idea to find the problem?

Thanks,
Alain.

\

Sorry Adam but this not yet the reason.
I build the libgesecr.so.0.1 like that:

make -j 1 -Cnto all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make -j 1 -Cx86 all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make -j 1 -Cso all && make -j 1 -Cso.g all
make[3]: Entering directory `/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto
-I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.0.1 -Wl,–verbose
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
consol.o ctrl_ge.o externs.o fct_nto.o gesaff.o
geschk.o gesecr.o io_funcs.o -L. -L/x86/lib -L/x86/usr/lib
-lm -lncurses -lRieter_misc -lDataServer_API
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
i386nto
elf32ppcnto
elf32bmipnto
armnto
shelf_nto
shlelf_nto
using internal linker script:

OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,
“elf32-i386”)
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/ntox86/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; /
SECTIONS
{
/
Read-only sections, merged into text segment: */
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
(.rel.text.)
(.rel.gnu.linkonce.t)
}
.rela.text :
{
*(.rela.text)
(.rela.text.)
(.rela.gnu.linkonce.t)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
(.rel.rodata.)
(.rel.gnu.linkonce.r)
}
.rela.rodata :
{
*(.rela.rodata)
(.rela.rodata.)
(.rela.gnu.linkonce.r)
}
.rel.data :
{
*(.rel.data)
(.rel.data.)
(.rel.gnu.linkonce.d)
}
.rela.data :
{
*(.rela.data)
(.rela.data.)
(.rela.gnu.linkonce.d)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
(.rel.sdata.)
(.rel.gnu.linkonce.s)
}
.rela.sdata :
{
*(.rela.sdata)
(.rela.sdata.)
(.rela.gnu.linkonce.s)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { (.rela.plt) }
.init :
{
KEEP (
(.init))
} =0x9090
.plt : { *(.plt) }
.text :
{
_btext = .;
*(.text)
(.text.)
(.stub)
/
.gnu.warning sections are handled specially by elf32.em. */
(.gnu.warning)
(.gnu.linkonce.t)
} =0x9090
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (
(.fini))
} =0x9090
.rodata : { (.rodata) (.rodata.) (.gnu.linkonce.r) }
.rodata1 : { (.rodata1) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = ALIGN(0x1000) + (. & (0x1000 - 1));
.data :
{
(.data)
(.data.)
(.gnu.linkonce.d)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
.eh_frame : { KEEP (
(.eh_frame)) }
.gcc_except_table : { (.gcc_except_table) }
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn’t matter if the user does not
actually link against crtbegin.o; the
linker won’t look for a file to match a
wildcard. The wildcard also means that it
doesn’t matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
/
We don’t want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.got : { *(.got.plt) *(.got) }
.dynamic : { (.dynamic) }
/
We want the small data sections together, so single-instruction
offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
(.sdata.)
(.gnu.linkonce.s.)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
(.sbss.)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
(.bss.)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. /
. = ALIGN(32 / :sunglasses:;
}
. = ALIGN(32 / :sunglasses:;
_end = .;
PROVIDE (end = .);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
These must appear regardless of . */
}

\

attempt to open /x86/lib/crti.o succeeded
/x86/lib/crti.o
attempt to open /x86/lib/crtbegin.o succeeded
/x86/lib/crtbegin.o
attempt to open consol.o succeeded
consol.o
attempt to open ctrl_ge.o succeeded
ctrl_ge.o
attempt to open externs.o succeeded
externs.o
attempt to open fct_nto.o succeeded
fct_nto.o
attempt to open gesaff.o succeeded
gesaff.o
attempt to open geschk.o succeeded
geschk.o
attempt to open gesecr.o succeeded
gesecr.o
attempt to open io_funcs.o succeeded
io_funcs.o
attempt to open ./libm.so failed
attempt to open ./libm.a failed
attempt to open /x86/lib/libm.so succeeded
-lm (/x86/lib/libm.so)
attempt to open ./libncurses.so failed
attempt to open ./libncurses.a failed
attempt to open /x86/lib/libncurses.so failed
attempt to open /x86/lib/libncurses.a failed
attempt to open /x86/usr/lib/libncurses.so succeeded
-lncurses (/x86/usr/lib/libncurses.so)
attempt to open ./libRieter_misc.so failed
attempt to open ./libRieter_misc.a failed
attempt to open /x86/lib/libRieter_misc.so failed
attempt to open /x86/lib/libRieter_misc.a failed
attempt to open /x86/usr/lib/libRieter_misc.so succeeded
-lRieter_misc (/x86/usr/lib/libRieter_misc.so)
attempt to open ./libDataServer_API.so failed
attempt to open ./libDataServer_API.a failed
attempt to open /x86/lib/libDataServer_API.so failed
attempt to open /x86/lib/libDataServer_API.a failed
attempt to open /x86/usr/lib/libDataServer_API.so succeeded
-lDataServer_API (/x86/usr/lib/libDataServer_API.so)
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open ./libc.so failed
attempt to open ./libc.a failed
attempt to open /x86/lib/libc.so succeeded
-lc (/x86/lib/libc.so)
attempt to open ./libcS.a failed
attempt to open /x86/lib/libcS.a succeeded
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open /x86/lib/crtend.o succeeded
/x86/lib/crtend.o
attempt to open /x86/lib/crtn.o succeeded
/x86/lib/crtn.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a
/usr/bin/ntox86-ar -r
/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a consol.o
ctrl_ge.o externs.o fct_nto.o gesaff.o geschk.o gesecr.o io_funcs.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto
-I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.0.1
-Wl,–verbose
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
consol.o ctrl_ge.o externs.o fct_nto.o gesaff.o
geschk.o gesecr.o io_funcs.o -L. -L/x86/lib -L/x86/usr/lib
-lm -lncurses -lRieter_misc -lDataServer_API -gdwarf-2
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
i386nto
elf32ppcnto
elf32bmipnto
armnto
shelf_nto
shlelf_nto
using internal linker script:

OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,
“elf32-i386”)
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/ntox86/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; /
SECTIONS
{
/
Read-only sections, merged into text segment: */
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
(.rel.text.)
(.rel.gnu.linkonce.t)
}
.rela.text :
{
*(.rela.text)
(.rela.text.)
(.rela.gnu.linkonce.t)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
(.rel.rodata.)
(.rel.gnu.linkonce.r)
}
.rela.rodata :
{
*(.rela.rodata)
(.rela.rodata.)
(.rela.gnu.linkonce.r)
}
.rel.data :
{
*(.rel.data)
(.rel.data.)
(.rel.gnu.linkonce.d)
}
.rela.data :
{
*(.rela.data)
(.rela.data.)
(.rela.gnu.linkonce.d)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
(.rel.sdata.)
(.rel.gnu.linkonce.s)
}
.rela.sdata :
{
*(.rela.sdata)
(.rela.sdata.)
(.rela.gnu.linkonce.s)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { (.rela.plt) }
.init :
{
KEEP (
(.init))
} =0x9090
.plt : { *(.plt) }
.text :
{
_btext = .;
*(.text)
(.text.)
(.stub)
/
.gnu.warning sections are handled specially by elf32.em. */
(.gnu.warning)
(.gnu.linkonce.t)
} =0x9090
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (
(.fini))
} =0x9090
.rodata : { (.rodata) (.rodata.) (.gnu.linkonce.r) }
.rodata1 : { (.rodata1) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = ALIGN(0x1000) + (. & (0x1000 - 1));
.data :
{
(.data)
(.data.)
(.gnu.linkonce.d)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
.eh_frame : { KEEP (
(.eh_frame)) }
.gcc_except_table : { (.gcc_except_table) }
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn’t matter if the user does not
actually link against crtbegin.o; the
linker won’t look for a file to match a
wildcard. The wildcard also means that it
doesn’t matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
/
We don’t want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.got : { *(.got.plt) *(.got) }
.dynamic : { (.dynamic) }
/
We want the small data sections together, so single-instruction
offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
(.sdata.)
(.gnu.linkonce.s.)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
(.sbss.)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
(.bss.)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. /
. = ALIGN(32 / :sunglasses:;
}
. = ALIGN(32 / :sunglasses:;
_end = .;
PROVIDE (end = .);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
These must appear regardless of . */
}

\

attempt to open /x86/lib/crti.o succeeded
/x86/lib/crti.o
attempt to open /x86/lib/crtbegin.o succeeded
/x86/lib/crtbegin.o
attempt to open consol.o succeeded
consol.o
attempt to open ctrl_ge.o succeeded
ctrl_ge.o
attempt to open externs.o succeeded
externs.o
attempt to open fct_nto.o succeeded
fct_nto.o
attempt to open gesaff.o succeeded
gesaff.o
attempt to open geschk.o succeeded
geschk.o
attempt to open gesecr.o succeeded
gesecr.o
attempt to open io_funcs.o succeeded
io_funcs.o
attempt to open ./libm.so failed
attempt to open ./libm.a failed
attempt to open /x86/lib/libm.so succeeded
-lm (/x86/lib/libm.so)
attempt to open ./libncurses.so failed
attempt to open ./libncurses.a failed
attempt to open /x86/lib/libncurses.so failed
attempt to open /x86/lib/libncurses.a failed
attempt to open /x86/usr/lib/libncurses.so succeeded
-lncurses (/x86/usr/lib/libncurses.so)
attempt to open ./libRieter_misc.so failed
attempt to open ./libRieter_misc.a failed
attempt to open /x86/lib/libRieter_misc.so failed
attempt to open /x86/lib/libRieter_misc.a failed
attempt to open /x86/usr/lib/libRieter_misc.so succeeded
-lRieter_misc (/x86/usr/lib/libRieter_misc.so)
attempt to open ./libDataServer_API.so failed
attempt to open ./libDataServer_API.a failed
attempt to open /x86/lib/libDataServer_API.so failed
attempt to open /x86/lib/libDataServer_API.a failed
attempt to open /x86/usr/lib/libDataServer_API.so succeeded
-lDataServer_API (/x86/usr/lib/libDataServer_API.so)
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open ./libc.so failed
attempt to open ./libc.a failed
attempt to open /x86/lib/libc.so succeeded
-lc (/x86/lib/libc.so)
attempt to open ./libcS.a failed
attempt to open /x86/lib/libcS.a succeeded
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open /x86/lib/crtend.o succeeded
/x86/lib/crtend.o
attempt to open /x86/lib/crtn.o succeeded
/x86/lib/crtn.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a
/usr/bin/ntox86-ar -r
/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a consol.o
ctrl_ge.o externs.o fct_nto.o gesaff.o geschk.o gesecr.o io_funcs.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' \ \ Then, I build test with libgesecr.so.0.1: make -j 1 -Cnto all make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr -lDataServer_API
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -DVARIANT_g /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr -lDataServer_API -gdwarf-2
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[1]: Leaving directory `/home/a.bonnefoy/src/gesecr/test/nto’

test will end with a sigsegv!!

Now I build test with libgesecr_g.so.0.1:
make -j 1 -Cnto all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto' make -j 1 -Cx86 all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make -j 1 -Co all && make -j 1 -Co.g all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o' /usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o -I/home/a.bonnefoy/src/gesecr/test/nto/x86 -I/home/a.bonnefoy/src/gesecr/test/nto -I/home/a.bonnefoy/src/gesecr/test -I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D GE_FAV_T3 /home/a.bonnefoy/src/gesecr/test/main.c /bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test /usr/bin/qcc -Vgcc_ntox86 -o/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test donnees.o exploit.o interfac.o main.o -L. -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib -L/x86/usr/lib -lgesecr_g -lDataServer_API /usr/bin/usemsg -s __USAGENTO -s __USAGE /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test /home/a.bonnefoy/src/gesecr/test/test.use /bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' /usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g -I/home/a.bonnefoy/src/gesecr/test/nto/x86 -I/home/a.bonnefoy/src/gesecr/test/nto -I/home/a.bonnefoy/src/gesecr/test -I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D GE_FAV_T3 -gdwarf-2 -DVARIANT_g /home/a.bonnefoy/src/gesecr/test/main.c /bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g /usr/bin/qcc -Vgcc_ntox86 -o/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g donnees.o exploit.o interfac.o main.o -L. -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib -L/x86/usr/lib -lgesecr_g -lDataServer_API -gdwarf-2 /usr/bin/usemsg -s __USAGENTO -s __USAGE /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g /home/a.bonnefoy/src/gesecr/test/test.use /bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto’

and test runs successfully!!

What’s the muddle?!?

thanks,
Alain.

Can you check libgescr.so.0.1 for text or rodata relocations.

objdump -h libgescr.so.0.1 | grep rel.text
objdump -h libgescr.so.0.1 | grep rel.rodata

Is there any DEBUG vs NDEBUG code in your lib?

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

Sorry Adam but this not yet the reason.
I build the libgesecr.so.0.1 like that:

make -j 1 -Cnto all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make -j 1 -Cx86 all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make -j 1 -Cso all && make -j 1 -Cso.g all
make[3]: Entering directory `/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto
-I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.0.1 -Wl,–verbose
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
consol.o ctrl_ge.o externs.o fct_nto.o gesaff.o
geschk.o gesecr.o io_funcs.o -L. -L/x86/lib -L/x86/usr/lib
-lm -lncurses -lRieter_misc -lDataServer_API
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
i386nto
elf32ppcnto
elf32bmipnto
armnto
shelf_nto
shlelf_nto
using internal linker script:

OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,
“elf32-i386”)
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/ntox86/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; /
SECTIONS
{
/
Read-only sections, merged into text segment: */
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
(.rel.text.)
(.rel.gnu.linkonce.t)
}
.rela.text :
{
*(.rela.text)
(.rela.text.)
(.rela.gnu.linkonce.t)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
(.rel.rodata.)
(.rel.gnu.linkonce.r)
}
.rela.rodata :
{
*(.rela.rodata)
(.rela.rodata.)
(.rela.gnu.linkonce.r)
}
.rel.data :
{
*(.rel.data)
(.rel.data.)
(.rel.gnu.linkonce.d)
}
.rela.data :
{
*(.rela.data)
(.rela.data.)
(.rela.gnu.linkonce.d)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
(.rel.sdata.)
(.rel.gnu.linkonce.s)
}
.rela.sdata :
{
*(.rela.sdata)
(.rela.sdata.)
(.rela.gnu.linkonce.s)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { (.rela.plt) }
.init :
{
KEEP (
(.init))
} =0x9090
.plt : { *(.plt) }
.text :
{
_btext = .;
*(.text)
(.text.)
(.stub)
/
.gnu.warning sections are handled specially by elf32.em. */
(.gnu.warning)
(.gnu.linkonce.t)
} =0x9090
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (
(.fini))
} =0x9090
.rodata : { (.rodata) (.rodata.) (.gnu.linkonce.r) }
.rodata1 : { (.rodata1) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = ALIGN(0x1000) + (. & (0x1000 - 1));
.data :
{
(.data)
(.data.)
(.gnu.linkonce.d)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
.eh_frame : { KEEP (
(.eh_frame)) }
.gcc_except_table : { (.gcc_except_table) }
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn’t matter if the user does not
actually link against crtbegin.o; the
linker won’t look for a file to match a
wildcard. The wildcard also means that it
doesn’t matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
/
We don’t want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.got : { *(.got.plt) *(.got) }
.dynamic : { (.dynamic) }
/
We want the small data sections together, so single-instruction
offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
(.sdata.)
(.gnu.linkonce.s.)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
(.sbss.)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
(.bss.)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. /
. = ALIGN(32 / > :sunglasses:> ;
}
. = ALIGN(32 / > :sunglasses:> ;
_end = .;
PROVIDE (end = .);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
These must appear regardless of . */
}


attempt to open /x86/lib/crti.o succeeded
/x86/lib/crti.o
attempt to open /x86/lib/crtbegin.o succeeded
/x86/lib/crtbegin.o
attempt to open consol.o succeeded
consol.o
attempt to open ctrl_ge.o succeeded
ctrl_ge.o
attempt to open externs.o succeeded
externs.o
attempt to open fct_nto.o succeeded
fct_nto.o
attempt to open gesaff.o succeeded
gesaff.o
attempt to open geschk.o succeeded
geschk.o
attempt to open gesecr.o succeeded
gesecr.o
attempt to open io_funcs.o succeeded
io_funcs.o
attempt to open ./libm.so failed
attempt to open ./libm.a failed
attempt to open /x86/lib/libm.so succeeded
-lm (/x86/lib/libm.so)
attempt to open ./libncurses.so failed
attempt to open ./libncurses.a failed
attempt to open /x86/lib/libncurses.so failed
attempt to open /x86/lib/libncurses.a failed
attempt to open /x86/usr/lib/libncurses.so succeeded
-lncurses (/x86/usr/lib/libncurses.so)
attempt to open ./libRieter_misc.so failed
attempt to open ./libRieter_misc.a failed
attempt to open /x86/lib/libRieter_misc.so failed
attempt to open /x86/lib/libRieter_misc.a failed
attempt to open /x86/usr/lib/libRieter_misc.so succeeded
-lRieter_misc (/x86/usr/lib/libRieter_misc.so)
attempt to open ./libDataServer_API.so failed
attempt to open ./libDataServer_API.a failed
attempt to open /x86/lib/libDataServer_API.so failed
attempt to open /x86/lib/libDataServer_API.a failed
attempt to open /x86/usr/lib/libDataServer_API.so succeeded
-lDataServer_API (/x86/usr/lib/libDataServer_API.so)
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open ./libc.so failed
attempt to open ./libc.a failed
attempt to open /x86/lib/libc.so succeeded
-lc (/x86/lib/libc.so)
attempt to open ./libcS.a failed
attempt to open /x86/lib/libcS.a succeeded
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open /x86/lib/crtend.o succeeded
/x86/lib/crtend.o
attempt to open /x86/lib/crtn.o succeeded
/x86/lib/crtn.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a
/usr/bin/ntox86-ar -r
/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a consol.o
ctrl_ge.o externs.o fct_nto.o gesaff.o geschk.o gesecr.o io_funcs.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto
-I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.0.1
-Wl,–verbose
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
consol.o ctrl_ge.o externs.o fct_nto.o gesaff.o
geschk.o gesecr.o io_funcs.o -L. -L/x86/lib -L/x86/usr/lib
-lm -lncurses -lRieter_misc -lDataServer_API -gdwarf-2
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
i386nto
elf32ppcnto
elf32bmipnto
armnto
shelf_nto
shlelf_nto
using internal linker script:

OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,
“elf32-i386”)
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/ntox86/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; /
SECTIONS
{
/
Read-only sections, merged into text segment: */
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
(.rel.text.)
(.rel.gnu.linkonce.t)
}
.rela.text :
{
*(.rela.text)
(.rela.text.)
(.rela.gnu.linkonce.t)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
(.rel.rodata.)
(.rel.gnu.linkonce.r)
}
.rela.rodata :
{
*(.rela.rodata)
(.rela.rodata.)
(.rela.gnu.linkonce.r)
}
.rel.data :
{
*(.rel.data)
(.rel.data.)
(.rel.gnu.linkonce.d)
}
.rela.data :
{
*(.rela.data)
(.rela.data.)
(.rela.gnu.linkonce.d)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
(.rel.sdata.)
(.rel.gnu.linkonce.s)
}
.rela.sdata :
{
*(.rela.sdata)
(.rela.sdata.)
(.rela.gnu.linkonce.s)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { (.rela.plt) }
.init :
{
KEEP (
(.init))
} =0x9090
.plt : { *(.plt) }
.text :
{
_btext = .;
*(.text)
(.text.)
(.stub)
/
.gnu.warning sections are handled specially by elf32.em. */
(.gnu.warning)
(.gnu.linkonce.t)
} =0x9090
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (
(.fini))
} =0x9090
.rodata : { (.rodata) (.rodata.) (.gnu.linkonce.r) }
.rodata1 : { (.rodata1) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = ALIGN(0x1000) + (. & (0x1000 - 1));
.data :
{
(.data)
(.data.)
(.gnu.linkonce.d)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
.eh_frame : { KEEP (
(.eh_frame)) }
.gcc_except_table : { (.gcc_except_table) }
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn’t matter if the user does not
actually link against crtbegin.o; the
linker won’t look for a file to match a
wildcard. The wildcard also means that it
doesn’t matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
/
We don’t want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.got : { *(.got.plt) *(.got) }
.dynamic : { (.dynamic) }
/
We want the small data sections together, so single-instruction
offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
(.sdata.)
(.gnu.linkonce.s.)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
(.sbss.)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
(.bss.)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. /
. = ALIGN(32 / > :sunglasses:> ;
}
. = ALIGN(32 / > :sunglasses:> ;
_end = .;
PROVIDE (end = .);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
These must appear regardless of . */
}


attempt to open /x86/lib/crti.o succeeded
/x86/lib/crti.o
attempt to open /x86/lib/crtbegin.o succeeded
/x86/lib/crtbegin.o
attempt to open consol.o succeeded
consol.o
attempt to open ctrl_ge.o succeeded
ctrl_ge.o
attempt to open externs.o succeeded
externs.o
attempt to open fct_nto.o succeeded
fct_nto.o
attempt to open gesaff.o succeeded
gesaff.o
attempt to open geschk.o succeeded
geschk.o
attempt to open gesecr.o succeeded
gesecr.o
attempt to open io_funcs.o succeeded
io_funcs.o
attempt to open ./libm.so failed
attempt to open ./libm.a failed
attempt to open /x86/lib/libm.so succeeded
-lm (/x86/lib/libm.so)
attempt to open ./libncurses.so failed
attempt to open ./libncurses.a failed
attempt to open /x86/lib/libncurses.so failed
attempt to open /x86/lib/libncurses.a failed
attempt to open /x86/usr/lib/libncurses.so succeeded
-lncurses (/x86/usr/lib/libncurses.so)
attempt to open ./libRieter_misc.so failed
attempt to open ./libRieter_misc.a failed
attempt to open /x86/lib/libRieter_misc.so failed
attempt to open /x86/lib/libRieter_misc.a failed
attempt to open /x86/usr/lib/libRieter_misc.so succeeded
-lRieter_misc (/x86/usr/lib/libRieter_misc.so)
attempt to open ./libDataServer_API.so failed
attempt to open ./libDataServer_API.a failed
attempt to open /x86/lib/libDataServer_API.so failed
attempt to open /x86/lib/libDataServer_API.a failed
attempt to open /x86/usr/lib/libDataServer_API.so succeeded
-lDataServer_API (/x86/usr/lib/libDataServer_API.so)
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open ./libc.so failed
attempt to open ./libc.a failed
attempt to open /x86/lib/libc.so succeeded
-lc (/x86/lib/libc.so)
attempt to open ./libcS.a failed
attempt to open /x86/lib/libcS.a succeeded
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open /x86/lib/crtend.o succeeded
/x86/lib/crtend.o
attempt to open /x86/lib/crtn.o succeeded
/x86/lib/crtn.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a
/usr/bin/ntox86-ar -r
/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a consol.o
ctrl_ge.o externs.o fct_nto.o gesaff.o geschk.o gesecr.o io_funcs.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' \ <br> Then, I build test with libgesecr.so.0.1: make -j 1 -Cnto all make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr -lDataServer_API
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -DVARIANT_g /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr -lDataServer_API -gdwarf-2
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[1]: Leaving directory `/home/a.bonnefoy/src/gesecr/test/nto’

test will end with a sigsegv!!

Now I build test with libgesecr_g.so.0.1:
make -j 1 -Cnto all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto' make -j 1 -Cx86 all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make -j 1 -Co all && make -j 1 -Co.g all
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o' /usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o -I/home/a.bonnefoy/src/gesecr/test/nto/x86 -I/home/a.bonnefoy/src/gesecr/test/nto -I/home/a.bonnefoy/src/gesecr/test -I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D GE_FAV_T3 /home/a.bonnefoy/src/gesecr/test/main.c /bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test /usr/bin/qcc -Vgcc_ntox86 -o/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test donnees.o exploit.o interfac.o main.o -L. -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib -L/x86/usr/lib -lgesecr_g -lDataServer_API /usr/bin/usemsg -s __USAGENTO -s __USAGE /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test /home/a.bonnefoy/src/gesecr/test/test.use /bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' /usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g -I/home/a.bonnefoy/src/gesecr/test/nto/x86 -I/home/a.bonnefoy/src/gesecr/test/nto -I/home/a.bonnefoy/src/gesecr/test -I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D GE_FAV_T3 -gdwarf-2 -DVARIANT_g /home/a.bonnefoy/src/gesecr/test/main.c /bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g /usr/bin/qcc -Vgcc_ntox86 -o/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g donnees.o exploit.o interfac.o main.o -L. -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so -L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib -L/x86/usr/lib -lgesecr_g -lDataServer_API -gdwarf-2 /usr/bin/usemsg -s __USAGENTO -s __USAGE /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g /home/a.bonnefoy/src/gesecr/test/test.use /bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g’
make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto’

and test runs successfully!!

What’s the muddle?!?

thanks,
Alain.


cburgess@qnx.com

Ok Colin,

Colin Burgess wrote:

Can you check libgescr.so.0.1 for text or rodata relocations.

objdump -h libgescr.so.0.1 | grep rel.text

Nothing.



objdump -h libgescr.so.0.1 | grep rel.rodata

Nothing.



Is there any DEBUG vs NDEBUG code in your lib?

Yes, three fprintf() are enclosed in #ifdef NDEBUG. But I removed these

lines and I still get a SIGSEGV.

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:

Sorry Adam but this not yet the reason.
I build the libgesecr.so.0.1 like that:


make -j 1 -Cnto all
make[1]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto' make -j 1 -Cx86 all make[2]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make -j 1 -Cso all && make -j 1 -Cso.g all
make[3]: Entering directory `/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto
-I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -shared -DVARIANT_so
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr.so.0.1 -Wl,–verbose
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
consol.o ctrl_ge.o externs.o fct_nto.o gesaff.o
geschk.o gesecr.o io_funcs.o -L. -L/x86/lib -L/x86/usr/lib
-lm -lncurses -lRieter_misc -lDataServer_API
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
i386nto
elf32ppcnto
elf32bmipnto
armnto
shelf_nto
shlelf_nto
using internal linker script:

OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,
“elf32-i386”)
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/ntox86/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; /
SECTIONS
{
/
Read-only sections, merged into text segment: */
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
(.rel.text.)
(.rel.gnu.linkonce.t)
}
.rela.text :
{
*(.rela.text)
(.rela.text.)
(.rela.gnu.linkonce.t)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
(.rel.rodata.)
(.rel.gnu.linkonce.r)
}
.rela.rodata :
{
*(.rela.rodata)
(.rela.rodata.)
(.rela.gnu.linkonce.r)
}
.rel.data :
{
*(.rel.data)
(.rel.data.)
(.rel.gnu.linkonce.d)
}
.rela.data :
{
*(.rela.data)
(.rela.data.)
(.rela.gnu.linkonce.d)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
(.rel.sdata.)
(.rel.gnu.linkonce.s)
}
.rela.sdata :
{
*(.rela.sdata)
(.rela.sdata.)
(.rela.gnu.linkonce.s)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { (.rela.plt) }
.init :
{
KEEP (
(.init))
} =0x9090
.plt : { *(.plt) }
.text :
{
_btext = .;
*(.text)
(.text.)
(.stub)
/
.gnu.warning sections are handled specially by elf32.em. */
(.gnu.warning)
(.gnu.linkonce.t)
} =0x9090
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (
(.fini))
} =0x9090
.rodata : { (.rodata) (.rodata.) (.gnu.linkonce.r) }
.rodata1 : { (.rodata1) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = ALIGN(0x1000) + (. & (0x1000 - 1));
.data :
{
(.data)
(.data.)
(.gnu.linkonce.d)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
.eh_frame : { KEEP (
(.eh_frame)) }
.gcc_except_table : { (.gcc_except_table) }
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn’t matter if the user does not
actually link against crtbegin.o; the
linker won’t look for a file to match a
wildcard. The wildcard also means that it
doesn’t matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
/
We don’t want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.got : { *(.got.plt) *(.got) }
.dynamic : { (.dynamic) }
/
We want the small data sections together, so single-instruction
offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
(.sdata.)
(.gnu.linkonce.s.)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
(.sbss.)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
(.bss.)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. /
. = ALIGN(32 / > :sunglasses:> ;
}
. = ALIGN(32 / > :sunglasses:> ;
_end = .;
PROVIDE (end = .);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
These must appear regardless of . */
}


\

attempt to open /x86/lib/crti.o succeeded
/x86/lib/crti.o
attempt to open /x86/lib/crtbegin.o succeeded
/x86/lib/crtbegin.o
attempt to open consol.o succeeded
consol.o
attempt to open ctrl_ge.o succeeded
ctrl_ge.o
attempt to open externs.o succeeded
externs.o
attempt to open fct_nto.o succeeded
fct_nto.o
attempt to open gesaff.o succeeded
gesaff.o
attempt to open geschk.o succeeded
geschk.o
attempt to open gesecr.o succeeded
gesecr.o
attempt to open io_funcs.o succeeded
io_funcs.o
attempt to open ./libm.so failed
attempt to open ./libm.a failed
attempt to open /x86/lib/libm.so succeeded
-lm (/x86/lib/libm.so)
attempt to open ./libncurses.so failed
attempt to open ./libncurses.a failed
attempt to open /x86/lib/libncurses.so failed
attempt to open /x86/lib/libncurses.a failed
attempt to open /x86/usr/lib/libncurses.so succeeded
-lncurses (/x86/usr/lib/libncurses.so)
attempt to open ./libRieter_misc.so failed
attempt to open ./libRieter_misc.a failed
attempt to open /x86/lib/libRieter_misc.so failed
attempt to open /x86/lib/libRieter_misc.a failed
attempt to open /x86/usr/lib/libRieter_misc.so succeeded
-lRieter_misc (/x86/usr/lib/libRieter_misc.so)
attempt to open ./libDataServer_API.so failed
attempt to open ./libDataServer_API.a failed
attempt to open /x86/lib/libDataServer_API.so failed
attempt to open /x86/lib/libDataServer_API.a failed
attempt to open /x86/usr/lib/libDataServer_API.so succeeded
-lDataServer_API (/x86/usr/lib/libDataServer_API.so)
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open ./libc.so failed
attempt to open ./libc.a failed
attempt to open /x86/lib/libc.so succeeded
-lc (/x86/lib/libc.so)
attempt to open ./libcS.a failed
attempt to open /x86/lib/libcS.a succeeded
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open /x86/lib/crtend.o succeeded
/x86/lib/crtend.o
attempt to open /x86/lib/crtn.o succeeded
/x86/lib/crtn.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecr.so
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a
/usr/bin/ntox86-ar -r
/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a consol.o
ctrl_ge.o externs.o fct_nto.o gesaff.o geschk.o gesecr.o io_funcs.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so/libgesecrS.a
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g
-I/home/a.bonnefoy/src/gesecr/gesecr/nto/x86
-I/home/a.bonnefoy/src/gesecr/gesecr/nto
-I/home/a.bonnefoy/src/gesecr/gesecr
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -shared -DVARIANT_so -DVARIANT_g
/home/a.bonnefoy/src/gesecr/gesecr/gesecr.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/usr/bin/qcc -Vgcc_ntox86 -shared -Wl,-hlibgesecr_g.so.0.1
-Wl,–verbose
-o/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
consol.o ctrl_ge.o externs.o fct_nto.o gesaff.o
geschk.o gesecr.o io_funcs.o -L. -L/x86/lib -L/x86/usr/lib
-lm -lncurses -lRieter_misc -lDataServer_API -gdwarf-2
GNU ld version 2.10.1 (with BFD 2.10.1)
Supported emulations:
i386nto
elf32ppcnto
elf32bmipnto
armnto
shelf_nto
shlelf_nto
using internal linker script:

OUTPUT_FORMAT(“elf32-i386”, “elf32-i386”,
“elf32-i386”)
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
SEARCH_DIR(/usr/ntox86/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; /
SECTIONS
{
/
Read-only sections, merged into text segment: */
. = 0 + SIZEOF_HEADERS;
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
.rela.init : { *(.rela.init) }
.rel.text :
{
*(.rel.text)
(.rel.text.)
(.rel.gnu.linkonce.t)
}
.rela.text :
{
*(.rela.text)
(.rela.text.)
(.rela.gnu.linkonce.t)
}
.rel.fini : { *(.rel.fini) }
.rela.fini : { *(.rela.fini) }
.rel.rodata :
{
*(.rel.rodata)
(.rel.rodata.)
(.rel.gnu.linkonce.r)
}
.rela.rodata :
{
*(.rela.rodata)
(.rela.rodata.)
(.rela.gnu.linkonce.r)
}
.rel.data :
{
*(.rel.data)
(.rel.data.)
(.rel.gnu.linkonce.d)
}
.rela.data :
{
*(.rela.data)
(.rela.data.)
(.rela.gnu.linkonce.d)
}
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.sdata :
{
*(.rel.sdata)
(.rel.sdata.)
(.rel.gnu.linkonce.s)
}
.rela.sdata :
{
*(.rela.sdata)
(.rela.sdata.)
(.rela.gnu.linkonce.s)
}
.rel.sbss : { *(.rel.sbss) }
.rela.sbss : { *(.rela.sbss) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { (.rela.plt) }
.init :
{
KEEP (
(.init))
} =0x9090
.plt : { *(.plt) }
.text :
{
_btext = .;
*(.text)
(.text.)
(.stub)
/
.gnu.warning sections are handled specially by elf32.em. */
(.gnu.warning)
(.gnu.linkonce.t)
} =0x9090
_etext = .;
PROVIDE (etext = .);
.fini :
{
KEEP (
(.fini))
} =0x9090
.rodata : { (.rodata) (.rodata.) (.gnu.linkonce.r) }
.rodata1 : { (.rodata1) }
/
Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. /
. = ALIGN(0x1000) + (. & (0x1000 - 1));
.data :
{
(.data)
(.data.)
(.gnu.linkonce.d)
SORT(CONSTRUCTORS)
}
.data1 : { (.data1) }
.eh_frame : { KEEP (
(.eh_frame)) }
.gcc_except_table : { (.gcc_except_table) }
.ctors :
{
/
gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn’t matter if the user does not
actually link against crtbegin.o; the
linker won’t look for a file to match a
wildcard. The wildcard also means that it
doesn’t matter which directory crtbegin.o
is in. /
KEEP (crtbegin.o(.ctors))
/
We don’t want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last /
KEEP (
(EXCLUDE_FILE (crtend.o ) .ctors))
KEEP (
(SORT(.ctors.
)))
KEEP (
(.ctors))
}
.dtors :
{
KEEP (crtbegin.o(.dtors))
KEEP (
(EXCLUDE_FILE (crtend.o ) .dtors))
KEEP (
(SORT(.dtors.
)))
KEEP (
(.dtors))
}
.got : { *(.got.plt) *(.got) }
.dynamic : { (.dynamic) }
/
We want the small data sections together, so single-instruction
offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata :
{
*(.sdata)
(.sdata.)
(.gnu.linkonce.s.)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.sbss :
{
*(.dynsbss)
*(.sbss)
(.sbss.)
*(.scommon)
}
.bss :
{
*(.dynbss)
*(.bss)
(.bss.)
(COMMON)
/
Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. /
. = ALIGN(32 / > :sunglasses:> ;
}
. = ALIGN(32 / > :sunglasses:> ;
_end = .;
PROVIDE (end = .);
/
Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { (.comment) }
/
DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. /
/
DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { (.line) }
/
GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { (.debug_sfnames) }
/
DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { (.debug_pubnames) }
/
DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { (.debug_macinfo) }
/
SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { (.debug_varnames) }
/
These must appear regardless of . */
}


\

attempt to open /x86/lib/crti.o succeeded
/x86/lib/crti.o
attempt to open /x86/lib/crtbegin.o succeeded
/x86/lib/crtbegin.o
attempt to open consol.o succeeded
consol.o
attempt to open ctrl_ge.o succeeded
ctrl_ge.o
attempt to open externs.o succeeded
externs.o
attempt to open fct_nto.o succeeded
fct_nto.o
attempt to open gesaff.o succeeded
gesaff.o
attempt to open geschk.o succeeded
geschk.o
attempt to open gesecr.o succeeded
gesecr.o
attempt to open io_funcs.o succeeded
io_funcs.o
attempt to open ./libm.so failed
attempt to open ./libm.a failed
attempt to open /x86/lib/libm.so succeeded
-lm (/x86/lib/libm.so)
attempt to open ./libncurses.so failed
attempt to open ./libncurses.a failed
attempt to open /x86/lib/libncurses.so failed
attempt to open /x86/lib/libncurses.a failed
attempt to open /x86/usr/lib/libncurses.so succeeded
-lncurses (/x86/usr/lib/libncurses.so)
attempt to open ./libRieter_misc.so failed
attempt to open ./libRieter_misc.a failed
attempt to open /x86/lib/libRieter_misc.so failed
attempt to open /x86/lib/libRieter_misc.a failed
attempt to open /x86/usr/lib/libRieter_misc.so succeeded
-lRieter_misc (/x86/usr/lib/libRieter_misc.so)
attempt to open ./libDataServer_API.so failed
attempt to open ./libDataServer_API.a failed
attempt to open /x86/lib/libDataServer_API.so failed
attempt to open /x86/lib/libDataServer_API.a failed
attempt to open /x86/usr/lib/libDataServer_API.so succeeded
-lDataServer_API (/x86/usr/lib/libDataServer_API.so)
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open ./libc.so failed
attempt to open ./libc.a failed
attempt to open /x86/lib/libc.so succeeded
-lc (/x86/lib/libc.so)
attempt to open ./libcS.a failed
attempt to open /x86/lib/libcS.a succeeded
attempt to open /usr/lib/gcc-lib/ntox86/2.95.2/libgcc.a succeeded
attempt to open /x86/lib/crtend.o succeeded
/x86/lib/crtend.o
attempt to open /x86/lib/crtn.o succeeded
/x86/lib/crtn.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_g.so
/bin/rm -f /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a
/usr/bin/ntox86-ar -r
/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a consol.o
ctrl_ge.o externs.o fct_nto.o gesaff.o geschk.o gesecr.o io_funcs.o
/bin/true /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g/libgesecr_gS.a
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto/x86’
make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/gesecr/nto' \ \ \ Then, I build test with libgesecr.so.0.1: make -j 1 -Cnto all make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr -lDataServer_API
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -DVARIANT_g /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr -lDataServer_API -gdwarf-2
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[1]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto' \ \ test will end with a sigsegv!! \ \ Now I build test with libgesecr_g.so.0.1: make -j 1 -Cnto all make[1]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto’
make -j 1 -Cx86 all
make[2]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86' make -j 1 -Co all && make -j 1 -Co.g all make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr_g -lDataServer_API
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o/test
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o' make[3]: Entering directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g’
/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O
-DNDEBUG -I. -I/home/a.bonnefoy/src/gesecr/test/nto/x86/o
-I/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g
-I/home/a.bonnefoy/src/gesecr/test/nto/x86
-I/home/a.bonnefoy/src/gesecr/test/nto
-I/home/a.bonnefoy/src/gesecr/test
-I/home/a.bonnefoy/src/gesecr/gesecr/public -I/usr/include -D
GE_FAV_T3 -gdwarf-2 -DVARIANT_g /home/a.bonnefoy/src/gesecr/test/main.c
/bin/rm -f /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/usr/bin/qcc -Vgcc_ntox86
-o/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g donnees.o
exploit.o interfac.o main.o -L.
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so
-L/home/a.bonnefoy/src/gesecr/gesecr/nto/x86/so.g -L/x86/lib
-L/x86/usr/lib -lgesecr_g -lDataServer_API -gdwarf-2
/usr/bin/usemsg -s __USAGENTO -s __USAGE
/home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
/home/a.bonnefoy/src/gesecr/test/test.use
/bin/true /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g/test_g
make[3]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86/o.g' make[2]: Leaving directory /home/a.bonnefoy/src/gesecr/test/nto/x86’
make[1]: Leaving directory `/home/a.bonnefoy/src/gesecr/test/nto’


and test runs successfully!!


What’s the muddle?!?


thanks,
Alain.
\