<br /><br /><span>Am 12.02.21 14:29 schrieb <b class="name">Carsten Grzemba via oi-dev </b> <oi-dev@openindiana.org>:</span><blockquote cite="mid:bf555b3d3a63.602690a2@contac-dt.de" class="iwcQuote" style="border-left: 1px solid #00F; padding-left: 13px; margin-left: 0;" type="cite"><div class="mimetype-multipart-mixed">Because my FF builds alwas core on startup, I try to build objects with debug information. But the linking of libxul.so fails with:<br /><br />Text relocation remains against symbol ..<br /><br />The releated option -shared and -fPIC are in place. There are a hint to use option -mimpure-text. I will it try but what does it mean?<br />There are any other hints? It is a little bit anoying, because the linking takes nearly 3hours on my build VM.<br /><br />/usr/gcc/9/bin/g++ -std=gnu++17 -fstack-protector-strong -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -fno-sized-deallocation -fno-aligned-new -O0 -fPIC -m64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-invalid-offsetof -fpermissive -fno-exceptions -fno-strict-aliasing -DSOLARIS -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -fno-omit-frame-pointer -funwind-tables -fPIC -shared -Wl,-h,libxul.so -o libxul.so @/code/github/openindiana/oi-userland/components/web/firefox-78esr/build/amd64/toolkit/library/build/libxul_so.list -lpthread -m64 -Wl,-z,text -fstack-protector-strong -L/code/github/openindiana/oi-userland/components/web/firefox-78esr/build/amd64/dist/bin '-Wl,-R,$ORIGIN' ../../../js/src/build/libjs_static.a /code/github/openindiana/oi-userland/components/web/firefox-78esr/build/amd64/x86_64-sun-solaris/debug/libgkrust.a ../../../config/external/lgpllibs/liblgpllibs.so ../../../config/external/sqlite/libmozsqlite3.so ../../../widget/gtk/mozgtk/stub/libmozgtk_stub.so -lsocket -licui18n -licuuc -licudata -lpthread -lffi -L/usr/lib/mps/amd64 -lplds4 -lplc4 -lnspr4 -ldl -lposix4 -R/usr/lib/mps/amd64 -lz -lm -lnsl -lsocket -lnss3 -lsmime3 -lssl3 -lnssutil3 -lfreetype -lfontconfig -lXrender -levent-2.0 -lpixman-1 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lX11-xcb -lxcb-shm -lxcb -lX11 -lXext -lpangoft2-1.0 -lXt -lgthread-2.0<br />ld: warning: symbol '_cairo_pattern_black' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src2.o value=0x98; file /usr/lib/amd64/libcairo.so value=0xa0);<br /> ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src2.o definition taken<br />ld: warning: symbol '_cairo_pattern_clear' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src2.o value=0x98; file /usr/lib/amd64/libcairo.so value=0xa0);<br /> ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src2.o definition taken<br />ld: warning: symbol '_cairo_user_font_face_backend' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src3.o value=0x38; file /usr/lib/amd64/libcairo.so value=0x28);<br /> ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src3.o definition taken<br />ld: warning: symbol '_cairo_pattern_white' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src2.o value=0x98; file /usr/lib/amd64/libcairo.so value=0xa0);<br /> ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src2.o definition taken<br />ld: warning: symbol '_cairo_image_surface_backend' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src1.o value=0x110; file /usr/lib/amd64/libcairo.so value=0xd8);<br /> ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src1.o definition taken<br />ld: warning: symbol '_cairo_font_face_nil' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src1.o value=0x38; file /usr/lib/amd64/libcairo.so value=0x30);<br /> ../../../gfx/cairo/cairo/src/Unified_c_gfx_cairo_cairo_src1.o definition taken<br />ld: warning: symbol '_cairo_ft_font_face_backend' has differing sizes:<br /> (file ../../../gfx/cairo/cairo/src/cairo-ft-font.o value=0x38; file /usr/lib/amd64/libcairo.so value=0x28);<br /> ../../../gfx/cairo/cairo/src/cairo-ft-font.o definition taken<br />Text relocation remains referenced<br /> against symbol offset in file<br />mozilla::ThreadSafeAutoRefCnt::ThreadSafeAutoRefCnt() 0x36 ../../../security/certverifier/Unified_cpp_certverifier0.o<br />mozilla::ThreadSafeAutoRefCnt::ThreadSafeAutoRefCnt() 0x25 ../../../security/apps/Unified_cpp_security_apps0.o<br /><br />..8<.. cut, 2500 such lines follow
<p></p><hr size="2" /></div></blockquote><span>Releated the optimized linkage there is not really a difference in the options beside the '-g'. Could it be that the objects like <br /></span><span>../../../security/certverifier/Unified_cpp_certverifier0.o<br />causing the trouble. And if so can I check this with readelf, elfdump, objdump or something else ? <br /><br /><br /><br /><br /><br /><br /><br /></span>