Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
95 user(s) are online (81 user(s) are browsing Forums)

Members: 1
Guests: 94

sailor, more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
The ADTOOLS thread
Quite a regular
Quite a regular


See User information
This is part of bringing the adtools up to date in the context of AOS4. One part is upgrading binutils, but this post is not about binutils right now. There has been discussion on the "Qt" thread about shared objects recently and I wanted to pull that part out into this thread. Later on, in the same thread we can discuss other sub-topics.

This revolves around using adtools with GCC 11.3 and binutils 2.23.2 and afxgroup's clib2 (where ever clib2 is used it refers to afxgroup clib2). This also means copying a modified amigos.h (from afxgroup clib2) file into the checked out gcc 11.3 repo - replacing the amigaos.h file in the rs6000 dir.

Regarding libstdc++.so:
I see that on a *LINUX* machine the following command (with link phase and compile phase verbosity) shows:
Reading specs from /home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/specs
COLLECT_GCC
=/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc
COLLECT_LTO_WRAPPER
=/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/lto-wrapper
Target
x86_64-pc-linux-gnu
Configured with
: ./configure --prefix=/home/rjd/Downloads/gcc/installLinux --disable-multilib
Thread model
posix
Supported LTO compression algorithms
zlib
gcc version 11.3.0 
(GCC
COMPILER_PATH=/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/
LIBRARY_PATH=/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib64/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-shared-libgcc' '-B' '/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc' '-nostdinc++' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs' '-B' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/bin/' '-B' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/lib/' '-isystem' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/include' '-isystem' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/sys-include' '-fno-checking' '-fPIC' '-D' 'PIC' '-D' '_GLIBCXX_SHARED' '-shared' '-nostdlib' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs' '-L/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc' '-L/lib/x86_64-linux-gnu' '-L/lib/../lib64' '-L/usr/lib/x86_64-linux-gnu' '-L/usr/lib/../lib64' '-v' '-o' '.libs/libstdc++.so.6.0.29' '-mtune=generic' '-march=x86-64' '-dumpdir' '.libs/libstdc++.so.6.0.29.'
 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/collect2 -plugin /home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/liblto_plugin.so -plugin-opt=/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/lto-wrapper -plugin-opt=-fresolution=/tmp/ccGtTgUR.res --eh-frame-hdr -m elf_x86_64 -shared -.libs/libstdc++.so.6.0.29 -L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 /lib/x86_64-linux-gnu/crti./home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/crtbeginS..libs/compatibility..libs/compatibility-debug_list..libs/compatibility-debug_list-2.o .libs/compatibility-c++0x..libs/compatibility-atomic-c++0x..libs/compatibility-thread-c++0x..libs/compatibility-chrono..libs/compatibility-condvar.--whole-archive ../libsupc++/.libs/libsupc++convenience.../src/c++98/.libs/libc++98convenience.../src/c++11/.libs/libc++11convenience.../src/c++17/.libs/libc++17convenience.../src/c++20/.libs/libc++20convenience.--no-whole-archive -lm -lc -lgcc_s /home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/crtendS./lib/x86_64-linux-gnu/crtn.-O1 -z relro --gc-sections --version-script=libstdc++-symbols.ver --verbose -soname libstdc++.so.6
GNU ld 
(GNU Binutils for Ubuntu2.38
  Supported emulations
:
   
elf_x86_64
   elf32_x86_64
   elf_i386
   elf_iamcu
   elf_l1om
   elf_k1om
   i386pep
   i386pe
using internal linker script
:
==================================================
/* Script for -shared -z combreloc -z separate-code */
/* Copyright (C) 2014-2022 Free Software Foundation, Inc.
   Copying and distribution of this script, with or without modification,
   are permitted in any medium without royalty provided the copyright
   notice and this notice are preserved.  */
OUTPUT_FORMAT("elf64-x86-64""elf64-x86-64",
          
"elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu64"); SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib");
SECTIONS
{
  . = 
SEGMENT_START("text-segment"0) + SIZEOF_HEADERS;
  .
note.gnu.build-id  : { *(.note.gnu.build-id) }
  .
hash           : { *(.hash) }
  .
gnu.hash       : { *(.gnu.hash) }
  .
dynsym         : { *(.dynsym) }
  .
dynstr         : { *(.dynstr) }
  .
gnu.version    : { *(.gnu.version) }
  .
gnu.version_d  : { *(.gnu.version_d) }
  .
gnu.version_r  : { *(.gnu.version_r) }
  .
rela.dyn       :
    {
      *(.
rela.init)
      *(.
rela.text .rela.text.* .rela.gnu.linkonce.t.*)
      *(.
rela.fini)
      *(.
rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
      *(.
rela.data .rela.data.* .rela.gnu.linkonce.d.*)
      *(.
rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
      *(.
rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
      *(.
rela.ctors)
      *(.
rela.dtors)
      *(.
rela.got)
      *(.
rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
      *(.
rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
      *(.
rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
      *(.
rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
      *(.
rela.ifunc)
    }
  .
rela.plt       :
    {
      *(.
rela.plt)
      *(.
rela.iplt)
    }
  .
relr.dyn : { *(.relr.dyn) }
  . = 
ALIGN(CONSTANT (MAXPAGESIZE));
  .
init           :
  {
    
KEEP (*(SORT_NONE(.init)))
  }
  .
plt            : { *(.plt) *(.iplt) }
.
plt.got        : { *(.plt.got) }
.
plt.sec        : { *(.plt.sec) }
  .
text           :
  {
    *(.
text.unlikely .text.*_unlikely .text.unlikely.*)
    *(.
text.exit .text.exit.*)
    *(.
text.startup .text.startup.*)
    *(.
text.hot .text.hot.*)
    *(
SORT(.text.sorted.*))
    *(.
text .stub .text.* .gnu.linkonce.t.*)
    
/* .gnu.warning sections are handled specially by elf.em.  */
    
*(.gnu.warning)
  }
  .
fini           :
  {
    
KEEP (*(SORT_NONE(.fini)))
  }
  
PROVIDE (__etext = .);
  
PROVIDE (_etext = .);
  
PROVIDE (etext = .);
  . = 
ALIGN(CONSTANT (MAXPAGESIZE));
  
/* Adjust the address for the rodata segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  
. = SEGMENT_START("rodata-segment"ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)));
  .
rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  .
rodata1        : { *(.rodata1) }
  .
eh_frame_hdr   : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
  .
eh_frame       ONLY_IF_RO KEEP (*(.eh_frame)) *(.eh_frame.*) }
  .
gcc_except_table   ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  .
gnu_extab   ONLY_IF_RO { *(.gnu_extab*) }
  
/* These sections are generated by the Sun/Oracle C++ compiler.  */
  
.exception_ranges   ONLY_IF_RO { *(.exception_ranges*) }
  
/* Adjust the address for the data segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  
. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  
/* Exception handling  */
  
.eh_frame       ONLY_IF_RW KEEP (*(.eh_frame)) *(.eh_frame.*) }
  .
gnu_extab      ONLY_IF_RW { *(.gnu_extab) }
  .
gcc_except_table   ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  .
exception_ranges   ONLY_IF_RW { *(.exception_ranges*) }
  
/* Thread Local Storage sections  */
  
.tdata      :
   {
     *(.
tdata .tdata.* .gnu.linkonce.td.*)
   }
  .
tbss          : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  .
preinit_array    :
  {
    
KEEP (*(.preinit_array))
  }
  .
init_array    :
  {
    
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
    
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.*crtbegin?.*crtend.*crtend?.) .ctors))
  }
  .
fini_array    :
  {
    
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
    
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.*crtbegin?.*crtend.*crtend?.) .dtors))
  }
  .
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))
    
KEEP (*crtbegin?.o(.ctors))
    
/* We don't want to include the .ctor section 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.*crtend?.) .ctors))
    
KEEP (*(SORT(.ctors.*)))
    
KEEP (*(.ctors))
  }
  .
dtors          :
  {
    
KEEP (*crtbegin.o(.dtors))
    
KEEP (*crtbegin?.o(.dtors))
    
KEEP (*(EXCLUDE_FILE (*crtend.*crtend?.) .dtors))
    
KEEP (*(SORT(.dtors.*)))
    
KEEP (*(.dtors))
  }
  .
jcr            : { KEEP (*(.jcr)) }
  .
data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
  .
dynamic        : { *(.dynamic) }
  .
got            : { *(.got) *(.igot) }
  . = 
DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 24 24 0, .);
  .
got.plt        : { *(.got.plt) *(.igot.plt) }
  .
data           :
  {
    *(.
data .data.* .gnu.linkonce.d.*)
    
SORT(CONSTRUCTORS)
  }
  .
data1          : { *(.data1) }
  
PROVIDE (_edata = .); PROVIDE (edata = .);
  . = .;
  
PROVIDE (__bss_start = .);
  .
bss            :
  {
   *(.
dynbss)
   *(.
bss .bss.* .gnu.linkonce.b.*)
   *(
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.
      FIXME: Why do we need it? When there is no .bss section, we do not
      pad the .data section.  */
   
. = ALIGN(. != 64 1);
  }
  .
lbss   :
  {
    *(.
dynlbss)
    *(.
lbss .lbss.* .gnu.linkonce.lb.*)
    *(
LARGE_COMMON)
  }
  . = 
ALIGN(64 8);
  . = 
SEGMENT_START("ldata-segment", .);
  .
lrodata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
  {
    *(.
lrodata .lrodata.* .gnu.linkonce.lr.*)
  }
  .
ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
  {
    *(.
ldata .ldata.* .gnu.linkonce.l.*)
    . = 
ALIGN(. != 64 1);
  }
  . = 
ALIGN(64 8);
  
PROVIDE (_end = .); PROVIDE (end = .);
  . = 
DATA_SEGMENT_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) }
  .
gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
  
/* 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 .gnu.linkonce.wi.*) }
  .
debug_abbrev   0 : { *(.debug_abbrev) }
  .
debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end) }
  .
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) }
  
/* DWARF 3.  */
  
.debug_pubtypes 0 : { *(.debug_pubtypes) }
  .
debug_ranges   0 : { *(.debug_ranges) }
  
/* DWARF 5.  */
  
.debug_addr     0 : { *(.debug_addr) }
  .
debug_line_str 0 : { *(.debug_line_str) }
  .
debug_loclists 0 : { *(.debug_loclists) }
  .
debug_macro    0 : { *(.debug_macro) }
  .
debug_names    0 : { *(.debug_names) }
  .
debug_rnglists 0 : { *(.debug_rnglists) }
  .
debug_str_offsets 0 : { *(.debug_str_offsets) }
  .
debug_sup      0 : { *(.debug_sup) }
  .
gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  /
DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
}


==================================================
/
usr/bin/ldmode elf_x86_64
attempt to open 
/lib/x86_64-linux-gnu/crti.o succeeded
/lib/x86_64-linux-gnu/crti.o
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/crtbeginS.o succeeded
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/crtbeginS.o
attempt to open 
.libs/compatibility.o succeeded
.libs/compatibility.o
attempt to open 
.libs/compatibility-debug_list.o succeeded
.libs/compatibility-debug_list.o
attempt to open 
.libs/compatibility-debug_list-2.o succeeded
.libs/compatibility-debug_list-2.o
attempt to open 
.libs/compatibility-c++0x.o succeeded
.libs/compatibility-c++0x.o
attempt to open 
.libs/compatibility-atomic-c++0x.o succeeded
.libs/compatibility-atomic-c++0x.o
attempt to open 
.libs/compatibility-thread-c++0x.o succeeded
.libs/compatibility-thread-c++0x.o
attempt to open 
.libs/compatibility-chrono.o succeeded
.libs/compatibility-chrono.o
attempt to open 
.libs/compatibility-condvar.o succeeded
.libs/compatibility-condvar.o
attempt to open 
../libsupc++/.libs/libsupc++convenience.a succeeded
../libsupc++/.libs/libsupc++convenience.a
(../libsupc++/.libs/libsupc++convenience.a)array_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)atexit_arm.o
(../libsupc++/.libs/libsupc++convenience.a)atexit_thread.o
(../libsupc++/.libs/libsupc++convenience.a)atomicity.o
(../libsupc++/.libs/libsupc++convenience.a)bad_alloc.o
(../libsupc++/.libs/libsupc++convenience.a)bad_array_length.o
(../libsupc++/.libs/libsupc++convenience.a)bad_array_new.o
(../libsupc++/.libs/libsupc++convenience.a)bad_cast.o
(../libsupc++/.libs/libsupc++convenience.a)bad_typeid.o
(../libsupc++/.libs/libsupc++convenience.a)class_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)del_op.o
(../libsupc++/.libs/libsupc++convenience.a)del_ops.o
(../libsupc++/.libs/libsupc++convenience.a)del_opnt.o
(../libsupc++/.libs/libsupc++convenience.a)del_opv.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvs.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvnt.o
(../libsupc++/.libs/libsupc++convenience.a)dyncast.o
(../libsupc++/.libs/libsupc++convenience.a)eh_alloc.o
(../libsupc++/.libs/libsupc++convenience.a)eh_arm.o
(../libsupc++/.libs/libsupc++convenience.a)eh_aux_runtime.o
(../libsupc++/.libs/libsupc++convenience.a)eh_call.o
(../libsupc++/.libs/libsupc++convenience.a)eh_catch.o
(../libsupc++/.libs/libsupc++convenience.a)eh_exception.o
(../libsupc++/.libs/libsupc++convenience.a)eh_globals.o
(../libsupc++/.libs/libsupc++convenience.a)eh_personality.o
(../libsupc++/.libs/libsupc++convenience.a)eh_ptr.o
(../libsupc++/.libs/libsupc++convenience.a)eh_term_handler.o
(../libsupc++/.libs/libsupc++convenience.a)eh_terminate.o
(../libsupc++/.libs/libsupc++convenience.a)eh_tm.o
(../libsupc++/.libs/libsupc++convenience.a)eh_throw.o
(../libsupc++/.libs/libsupc++convenience.a)eh_type.o
(../libsupc++/.libs/libsupc++convenience.a)eh_unex_handler.o
(../libsupc++/.libs/libsupc++convenience.a)enum_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)function_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)fundamental_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)guard.o
(../libsupc++/.libs/libsupc++convenience.a)guard_error.o
(../libsupc++/.libs/libsupc++convenience.a)hash_bytes.o
(../libsupc++/.libs/libsupc++convenience.a)nested_exception.o
(../libsupc++/.libs/libsupc++convenience.a)new_handler.o
(../libsupc++/.libs/libsupc++convenience.a)new_op.o
(../libsupc++/.libs/libsupc++convenience.a)new_opnt.o
(../libsupc++/.libs/libsupc++convenience.a)new_opv.o
(../libsupc++/.libs/libsupc++convenience.a)new_opvnt.o
(../libsupc++/.libs/libsupc++convenience.a)new_opa.o
(../libsupc++/.libs/libsupc++convenience.a)new_opant.o
(../libsupc++/.libs/libsupc++convenience.a)new_opva.o
(../libsupc++/.libs/libsupc++convenience.a)new_opvant.o
(../libsupc++/.libs/libsupc++convenience.a)del_opa.o
(../libsupc++/.libs/libsupc++convenience.a)del_opant.o
(../libsupc++/.libs/libsupc++convenience.a)del_opsa.o
(../libsupc++/.libs/libsupc++convenience.a)del_opva.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvant.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvsa.o
(../libsupc++/.libs/libsupc++convenience.a)pbase_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)pmem_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)pointer_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)pure.o
(../libsupc++/.libs/libsupc++convenience.a)si_class_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)tinfo.o
(../libsupc++/.libs/libsupc++convenience.a)tinfo2.o
(../libsupc++/.libs/libsupc++convenience.a)vec.o
(../libsupc++/.libs/libsupc++convenience.a)vmi_class_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)vterminate.o
(../libsupc++/.libs/libsupc++convenience.a)cp-demangle.o
attempt to open 
../src/c++98/.libs/libc++98convenience.a succeeded
../src/c++98/.libs/libc++98convenience.a
(../src/c++98/.libs/libc++98convenience.a)bitmap_allocator.o
(../src/c++98/.libs/libc++98convenience.a)pool_allocator.o
(../src/c++98/.libs/libc++98convenience.a)mt_allocator.o
(../src/c++98/.libs/libc++98convenience.a)codecvt.o
(../src/c++98/.libs/libc++98convenience.a)complex_io.o
(../src/c++98/.libs/libc++98convenience.a)globals_io.o
(../src/c++98/.libs/libc++98convenience.a)hash_tr1.o
(../src/c++98/.libs/libc++98convenience.a)hashtable_tr1.o
(../src/c++98/.libs/libc++98convenience.a)ios_failure.o
(../src/c++98/.libs/libc++98convenience.a)ios_init.o
(../src/c++98/.libs/libc++98convenience.a)ios_locale.o
(../src/c++98/.libs/libc++98convenience.a)list.o
(../src/c++98/.libs/libc++98convenience.a)list-aux.o
(../src/c++98/.libs/libc++98convenience.a)list-aux-2.o
(../src/c++98/.libs/libc++98convenience.a)list_associated.o
(../src/c++98/.libs/libc++98convenience.a)list_associated-2.o
(../src/c++98/.libs/libc++98convenience.a)locale.o
(../src/c++98/.libs/libc++98convenience.a)locale_init.o
(../src/c++98/.libs/libc++98convenience.a)locale_facets.o
(../src/c++98/.libs/libc++98convenience.a)localename.o
(../src/c++98/.libs/libc++98convenience.a)math_stubs_float.o
(../src/c++98/.libs/libc++98convenience.a)math_stubs_long_double.o
(../src/c++98/.libs/libc++98convenience.a)stdexcept.o
(../src/c++98/.libs/libc++98convenience.a)strstream.o
(../src/c++98/.libs/libc++98convenience.a)tree.o
(../src/c++98/.libs/libc++98convenience.a)istream.o
(../src/c++98/.libs/libc++98convenience.a)istream-string.o
(../src/c++98/.libs/libc++98convenience.a)streambuf.o
(../src/c++98/.libs/libc++98convenience.a)valarray.o
(../src/c++98/.libs/libc++98convenience.a)cow-istream-string.o
(../src/c++98/.libs/libc++98convenience.a)collate_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)messages_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)monetary_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)numeric_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)codecvt_members.o
(../src/c++98/.libs/libc++98convenience.a)collate_members.o
(../src/c++98/.libs/libc++98convenience.a)messages_members.o
(../src/c++98/.libs/libc++98convenience.a)monetary_members.o
(../src/c++98/.libs/libc++98convenience.a)numeric_members.o
(../src/c++98/.libs/libc++98convenience.a)time_members.o
(../src/c++98/.libs/libc++98convenience.a)basic_file.o
(../src/c++98/.libs/libc++98convenience.a)c++locale.o
(../src/c++98/.libs/libc++98convenience.a)allocator-inst.o
(../src/c++98/.libs/libc++98convenience.a)concept-inst.o
(../src/c++98/.libs/libc++98convenience.a)ext-inst.o
(../src/c++98/.libs/libc++98convenience.a)misc-inst.o
(../src/c++98/.libs/libc++98convenience.a)parallel_settings.o
attempt to open 
../src/c++11/.libs/libc++11convenience.a succeeded
../src/c++11/.libs/libc++11convenience.a
(../src/c++11/.libs/libc++11convenience.a)chrono.o
(../src/c++11/.libs/libc++11convenience.a)codecvt.o
(../src/c++11/.libs/libc++11convenience.a)condition_variable.o
(../src/c++11/.libs/libc++11convenience.a)cow-stdexcept.o
(../src/c++11/.libs/libc++11convenience.a)ctype.o
(../src/c++11/.libs/libc++11convenience.a)debug.o
(../src/c++11/.libs/libc++11convenience.a)functexcept.o
(../src/c++11/.libs/libc++11convenience.a)functional.o
(../src/c++11/.libs/libc++11convenience.a)futex.o
(../src/c++11/.libs/libc++11convenience.a)future.o
(../src/c++11/.libs/libc++11convenience.a)hash_c++0x.o
(../src/c++11/.libs/libc++11convenience.a)hashtable_c++0x.o
(../src/c++11/.libs/libc++11convenience.a)ios.o
(../src/c++11/.libs/libc++11convenience.a)limits.o
(../src/c++11/.libs/libc++11convenience.a)mutex.o
(../src/c++11/.libs/libc++11convenience.a)placeholders.o
(../src/c++11/.libs/libc++11convenience.a)random.o
(../src/c++11/.libs/libc++11convenience.a)regex.o
(../src/c++11/.libs/libc++11convenience.a)shared_ptr.o
(../src/c++11/.libs/libc++11convenience.a)snprintf_lite.o
(../src/c++11/.libs/libc++11convenience.a)system_error.o
(../src/c++11/.libs/libc++11convenience.a)thread.o
(../src/c++11/.libs/libc++11convenience.a)cow-locale_init.o
(../src/c++11/.libs/libc++11convenience.a)cow-shim_facets.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-hash_tr1.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-ios_failure.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-shim_facets.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-stdexcept.o
(../src/c++11/.libs/libc++11convenience.a)ctype_configure_char.o
(../src/c++11/.libs/libc++11convenience.a)ctype_members.o
(../src/c++11/.libs/libc++11convenience.a)cow-fstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-sstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-string-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-string-io-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-wstring-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-wstring-io-inst.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-locale-inst.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-wlocale-inst.o
(../src/c++11/.libs/libc++11convenience.a)sso_string.o
(../src/c++11/.libs/libc++11convenience.a)ext11-inst.o
(../src/c++11/.libs/libc++11convenience.a)fstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)ios-inst.o
(../src/c++11/.libs/libc++11convenience.a)iostream-inst.o
(../src/c++11/.libs/libc++11convenience.a)istream-inst.o
(../src/c++11/.libs/libc++11convenience.a)locale-inst.o
(../src/c++11/.libs/libc++11convenience.a)ostream-inst.o
(../src/c++11/.libs/libc++11convenience.a)sstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)streambuf-inst.o
(../src/c++11/.libs/libc++11convenience.a)string-inst.o
(../src/c++11/.libs/libc++11convenience.a)string-io-inst.o
(../src/c++11/.libs/libc++11convenience.a)wlocale-inst.o
(../src/c++11/.libs/libc++11convenience.a)wstring-inst.o
(../src/c++11/.libs/libc++11convenience.a)wstring-io-inst.o
attempt to open 
../src/c++17/.libs/libc++17convenience.a succeeded
../src/c++17/.libs/libc++17convenience.a
(../src/c++17/.libs/libc++17convenience.a)floating_from_chars.o
(../src/c++17/.libs/libc++17convenience.a)floating_to_chars.o
(../src/c++17/.libs/libc++17convenience.a)fs_dir.o
(../src/c++17/.libs/libc++17convenience.a)fs_ops.o
(../src/c++17/.libs/libc++17convenience.a)fs_path.o
(../src/c++17/.libs/libc++17convenience.a)memory_resource.o
(../src/c++17/.libs/libc++17convenience.a)cow-fs_dir.o
(../src/c++17/.libs/libc++17convenience.a)cow-fs_ops.o
(../src/c++17/.libs/libc++17convenience.a)cow-fs_path.o
(../src/c++17/.libs/libc++17convenience.a)ostream-inst.o
(../src/c++17/.libs/libc++17convenience.a)string-inst.o
(../src/c++17/.libs/libc++17convenience.a)cow-string-inst.o
attempt to open 
../src/c++20/.libs/libc++20convenience.a succeeded
../src/c++20/.libs/libc++20convenience.a
(../src/c++20/.libs/libc++20convenience.a)sstream-inst.o
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libm.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libm.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libm.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libm.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libm.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libm.a failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libm.so failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libm.a failed
attempt to open 
/lib/x86_64-linux-gnu/libm.so succeeded
opened script file 
/lib/x86_64-linux-gnu/libm.so
/lib/x86_64-linux-gnu/libm.so
opened script file 
/lib/x86_64-linux-gnu/libm.so
attempt to open 
/lib/x86_64-linux-gnu/libm.so.6 succeeded
/lib/x86_64-linux-gnu/libm.so.6
attempt to open 
/lib/x86_64-linux-gnu/libmvec.so.1 succeeded
/lib/x86_64-linux-gnu/libmvec.so.1
/lib/x86_64-linux-gnu/libmvec.so.1
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libc.a failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libc.so failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libc.a failed
attempt to open 
/lib/x86_64-linux-gnu/libc.so succeeded
opened script file 
/lib/x86_64-linux-gnu/libc.so
/lib/x86_64-linux-gnu/libc.so
opened script file 
/lib/x86_64-linux-gnu/libc.so
attempt to open 
/lib/x86_64-linux-gnu/libc.so.6 succeeded
/lib/x86_64-linux-gnu/libc.so.6
attempt to open 
/usr/lib/x86_64-linux-gnu/libc_nonshared.a succeeded
/usr/lib/x86_64-linux-gnu/libc_nonshared.a
(/usr/lib/x86_64-linux-gnu/libc_nonshared.a)atexit.oS
attempt to open 
/lib64/ld-linux-x86-64.so.2 succeeded
/lib64/ld-linux-x86-64.so.2
/usr/lib/x86_64-linux-gnu/libc_nonshared.a
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc_s.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc_s.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc_s.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc_s.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc_s.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc_s.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc_s.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc_s.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc_s.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc_s.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc_s.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc_s.a failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc_s.so succeeded
opened script file 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc_s.so
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc_s.so
opened script file 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc_s.so
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc_s.so.1 succeeded
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc_s.so.1
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs/libgcc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/libgcc.a failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libgcc.a failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc.so failed
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc.a succeeded
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/libgcc.a
attempt to open 
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/crtendS.o succeeded
/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc/crtendS.o
attempt to open 
/lib/x86_64-linux-gnu/crtn.o succeeded
/lib/x86_64-linux-gnu/crtn.o
COLLECT_GCC_OPTIONS
='-shared-libgcc' '-B' '/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc' '-nostdinc++' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs' '-B' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/bin/' '-B' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/lib/' '-isystem' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/include' '-isystem' '/home/rjd/Downloads/gcc/installLinux/x86_64-pc-linux-gnu/sys-include' '-fno-checking' '-fPIC' '-D' 'PIC' '-D' '_GLIBCXX_SHARED' '-shared' '-nostdlib' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src' '-L/home/rjd/Downloads/gcc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs' '-L/home/rjd/Downloads/gcc/host-x86_64-pc-linux-gnu/gcc' '-L/lib/x86_64-linux-gnu' '-L/lib/../lib64' '-L/usr/lib/x86_64-linux-gnu' '-L/usr/lib/../lib64' '-v' '-o' '.libs/libstdc++.so.6.0.29' '-mtune=generic' '-march=x86-64' '-dumpdir' '.libs/libstdc++.so.6.0.29.'

The readelf -d:
Dynamic section at offset 0x20ec40 contains 31 entries:
  
Tag        Type                         Name/Value
 0x0000000000000001 
(NEEDED)             Shared library: [libm.so.6]
 
0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 
0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]
 
0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 
0x000000000000000e (SONAME)             Library soname: [libstdc++.so.6]
 
0x000000000000000c (INIT)               0xa1000
 0x000000000000000d 
(FINI)               0x198e04
 0x0000000000000019 
(INIT_ARRAY)         0x2068b8
 0x000000000000001b 
(INIT_ARRAYSZ)       96 (bytes)
 
0x000000000000001a (FINI_ARRAY)         0x206918
 0x000000000000001c 
(FINI_ARRAYSZ)       (bytes)
 
0x0000000000000004 (HASH)               0x2a8
 0x000000006ffffef5 
(GNU_HASH)           0x82c0
 0x0000000000000005 
(STRTAB)             0x350d0
 0x0000000000000006 
(SYMTAB)             0x11010
 0x000000000000000a 
(STRSZ)              301476 (bytes)
 
0x000000000000000b (SYMENT)             24 (bytes)
 
0x0000000000000003 (PLTGOT)             0x211000
 0x0000000000000002 
(PLTRELSZ)           24648 (bytes)
 
0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 
(JMPREL)             0x9a7d0
 0x0000000000000007 
(RELA)               0x82260
 0x0000000000000008 
(RELASZ)             99696 (bytes)
 
0x0000000000000009 (RELAENT)            24 (bytes)
 
0x000000006ffffffc (VERDEF)             0x81a88
 0x000000006ffffffd 
(VERDEFNUM)          47
 0x000000006ffffffe 
(VERNEED)            0x82100
 0x000000006fffffff 
(VERNEEDNUM)         4
 0x000000006ffffff0 
(VERSYM)             0x7ea74
 0x000000006ffffff9 
(RELACOUNT)          888
 0x0000000000000000 
(NULL)               0x0


Compare this to creating the cross tools for Amiga:
Reading specs from /tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/specs
COLLECT_GCC
=/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/xgcc
COLLECT_LTO_WRAPPER
=/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/lto-wrapper
Target
ppc-amigaos
Configured with
: /tmp/4afx/4afx_adtools/gcc/repo/configure --with-bugurl=https://github.com/sba1/adtools/issues --with-pkgversion='adtools build 11.3.0' --target=ppc-amigaos --prefix=/tmp/4afx/4afx_build --enable-languages=c,c++ --enable-haifa --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-tls --enable-threads=amigaos --enable-lto --disable-c++tools
Thread modelamigaos
Supported LTO compression algorithms
zlib
gcc version 11.3.0 
(adtools build 11.3.0
COMPILER_PATH=/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/:/tmp/4afx/4afx_build/ppc-amigaos/bin/:/tmp/4afx/4afx_build/ppc-amigaos/lib/
LIBRARY_PATH=/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/clib2/:/tmp/4afx/4afx_build/ppc-amigaos/lib/clib2/:/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/:/tmp/4afx/4afx_build/ppc-amigaos/bin/:/tmp/4afx/4afx_build/ppc-amigaos/lib/
COLLECT_GCC_OPTIONS='-shared-libgcc' '-B' '/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc' '-nostdinc++' '-L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src' '-L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src/.libs' '-L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/libsupc++/.libs' '-B' '/tmp/4afx/4afx_build/ppc-amigaos/bin/' '-B' '/tmp/4afx/4afx_build/ppc-amigaos/lib/' '-isystem' '/tmp/4afx/4afx_build/ppc-amigaos/include' '-isystem' '/tmp/4afx/4afx_build/ppc-amigaos/sys-include' '-mcrt=clib2' '-fPIC' '-D' 'PIC' '-D' '_GLIBCXX_SHARED' '-shared' '-nostdlib' '-mcrt=clib2' '-mcrt=clib2' '-o' '.libs/libstdc++.so' '-v' '-dumpdir' '.libs/libstdc++.so.'
 
/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/collect2 -plugin /tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/liblto_plugin.so -plugin-opt=/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/lto-wrapper -plugin-opt=-fresolution=/tmp/ccVAfIWd.res --defsym __amigaos4__=----Qy -shared -dy --defsym __dynld_version__=-L/tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib -L/tmp/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib -L/tmp/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib -L/tmp/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib -.libs/libstdc++.so -L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src -L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src/.libs -L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/libsupc++/.libs -L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc/clib2 -L/tmp/4afx/4afx_build/ppc-amigaos/lib/clib2 -L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc -L/tmp/4afx/4afx_build/ppc-amigaos/bin -L/tmp/4afx/4afx_build/ppc-amigaos/lib /tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/shcrtbegin..libs/compatibility..libs/compatibility-debug_list..libs/compatibility-debug_list-2.o .libs/compatibility-c++0x..libs/compatibility-atomic-c++0x..libs/compatibility-thread-c++0x..libs/compatibility-chrono..libs/compatibility-condvar.--whole-archive ../libsupc++/.libs/libsupc++convenience.../src/c++98/.libs/libc++98convenience.../src/c++11/.libs/libc++11convenience.../src/c++17/.libs/libc++17convenience.../src/c++20/.libs/libc++20convenience.--no-whole-archive /tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/shcrtend.-O1 -z relro --gc-sections -soname libstdc++.so --verbose
GNU ld 
(GNU Binutils2.23.2
  Supported emulations
:
   
amigaos
   elf32ppc
GNU ld 
(GNU Binutils2.23.2
  Supported emulations
:
   
amigaos
   elf32ppc
using internal linker script
:
==================================================
/* Script for ld --shared: link shared library */
OUTPUT_FORMAT("elf32-amigaos""elf32-amigaos",
          
"elf32-amigaos")
OUTPUT_ARCH(powerpc)
ENTRY(_start)
SEARCH_DIR("/tmp/4afx/4afx_build/ppc-amigaos/lib");
PROVIDE (__stack 0); PROVIDE (___stack 0);
SECTIONS
{
  
/* Read-only sections, merged into text segment: */
  
. = 0x10000000 SIZEOF_HEADERS;
  .
note.gnu.build-id : { *(.note.gnu.build-id) }
  .
hash           : { *(.hash) }
  .
gnu.hash       : { *(.gnu.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.ro   : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
  .
rela.data.rel.ro   : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
  .
rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
  .
rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
  .
rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
  .
rela.tdata      : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
  .
rel.tbss      : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
  .
rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
  .
rel.ctors      : { *(.rel.ctors) }
  .
rela.ctors     : { *(.rela.ctors) }
  .
rel.dtors      : { *(.rel.dtors) }
  .
rela.dtors     : { *(.rela.dtors) }
  .
rel.got        : { *(.rel.got) }
  .
rela.got       : { *(.rela.got) }
  .
rela.got1           : { *(.rela.got1) }
  .
rela.got2           : { *(.rela.got2) }
  .
rel.sdata      : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
  .
rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
  .
rel.sbss       : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
  .
rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
  .
rel.sdata2     : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
  .
rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
  .
rel.sbss2      : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
  .
rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
  .
rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
  .
rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
  .
rel.plt        : { *(.rel.plt) }
  .
rela.plt       : { *(.rela.plt) }
  .
init           :
  {
    
KEEP (*(.init))
  } =
0
  
.text           :
  {
    *(.
text .stub .text.* .gnu.linkonce.t.*)
    
KEEP (*(.text.*personality*))
    
/* .gnu.warning sections are handled specially by elf32.em.  */
    
*(.gnu.warning)
    *(.
glink)
  } =
0
  
. = ALIGN(4096);
  .
plt            :  { *(.plt) }
  . = 
ALIGN(4096);
  .
fini           :
  {
    
KEEP (*(.fini))
  } =
0
  PROVIDE 
(__etext = .);
  
PROVIDE (_etext = .);
  
PROVIDE (etext = .);
  .
rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  .
rodata1        : { *(.rodata1) }
  .
eh_frame_hdr : { *(.eh_frame_hdr) }
  .
eh_frame       ONLY_IF_RO KEEP (*(.eh_frame)) }
  .
gcc_except_table   ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  
/* 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 (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  
/* Exception handling  */
  
.eh_frame       ONLY_IF_RW KEEP (*(.eh_frame)) }
  .
gcc_except_table   ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  
/* Thread Local Storage sections  */
  
.tdata      : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  .
tbss          : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  .
preinit_array     :
  {
    
KEEP (*(.preinit_array))
  }
  .
init_array     :
  {
     
KEEP (*(SORT(.init_array.*)))
     
KEEP (*(.init_array))
  }
  .
fini_array     :
  {
    
KEEP (*(.fini_array))
    
KEEP (*(SORT(.fini_array.*)))
  }
  .
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))
    
KEEP (*crtbegin?.o(.ctors))
    
/* We don't want to include the .ctor section 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.*crtend?.) .ctors))
    
KEEP (*(SORT(.ctors.*)))
    
KEEP (*(.ctors))
  }
  .
dtors          :
  {
    
KEEP (*crtbegin.o(.dtors))
    
KEEP (*crtbegin?.o(.dtors))
    
KEEP (*(EXCLUDE_FILE (*crtend.*crtend?.) .dtors))
    
KEEP (*(SORT(.dtors.*)))
    
KEEP (*(.dtors))
  }
  .
jcr            : { KEEP (*(.jcr)) }
  .
data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
  .
fixup          : { *(.fixup) }
  .
got1           : { *(.got1) }
  .
got2           : { *(.got2) }
  .
dynamic        : { *(.dynamic) }
  .
got            SPECIAL { *(.got) }
  . = 
DATA_SEGMENT_RELRO_END (0, .);
  .
data           :
  {
    
_DATA_BASE_ = .;
    *(.
data .data.* .gnu.linkonce.d.*)
    
KEEP (*(.gnu.linkonce.d.*personality*))
    
SORT(CONSTRUCTORS)
  }
  .
data1          : { *(.data1) }
  .
got            SPECIAL { *(.got) }
  
/* 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          :
  {
    
_SDA_BASE_ = . + 0x8000;
    *(.
sdata2 .sdata2.* .gnu.linkonce.s2.*)
    *(.
sdata .sdata.* .gnu.linkonce.s.*)
  }
  
_edata = .; PROVIDE (edata = .);
  
__bss_start = .;
  .
sbss           :
  {
    *(.
sbss2 .sbss2.* .gnu.linkonce.sb2.*)
    *(.
dynsbss)
    *(.
sbss .sbss.* .gnu.linkonce.sb.*)
    *(.
scommon)
  }
  .
bss            :
  {
   *(.
dynbss)
   *(.
bss .bss.* .gnu.linkonce.b.*)
   *(
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.
      FIXME: Why do we need it? When there is no .bss section, we don't
      pad the .data section.  */
   
. = ALIGN(. != 16 1);
  }
  . = 
ALIGN(16);
  . = 
ALIGN(16);
  
__end = .;
  
_end = .; PROVIDE (end = .);
  . = 
DATA_SEGMENT_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 .gnu.linkonce.wi.*) }
  .
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) }
  
/* DWARF 3 */
  
.debug_pubtypes 0 : { *(.debug_pubtypes) }
  .
debug_ranges   0 : { *(.debug_ranges) }
  .
gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  /
DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
}


==================================================
attempt to open /tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/shcrtbegin.o succeeded
/tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/shcrtbegin.o
attempt to open 
.libs/compatibility.o succeeded
.libs/compatibility.o
attempt to open 
.libs/compatibility-debug_list.o succeeded
.libs/compatibility-debug_list.o
attempt to open 
.libs/compatibility-debug_list-2.o succeeded
.libs/compatibility-debug_list-2.o
attempt to open 
.libs/compatibility-c++0x.o succeeded
.libs/compatibility-c++0x.o
attempt to open 
.libs/compatibility-atomic-c++0x.o succeeded
.libs/compatibility-atomic-c++0x.o
attempt to open 
.libs/compatibility-thread-c++0x.o succeeded
.libs/compatibility-thread-c++0x.o
attempt to open 
.libs/compatibility-chrono.o succeeded
.libs/compatibility-chrono.o
attempt to open 
.libs/compatibility-condvar.o succeeded
.libs/compatibility-condvar.o
attempt to open 
../libsupc++/.libs/libsupc++convenience.a succeeded
(../libsupc++/.libs/libsupc++convenience.a)array_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)atexit_arm.o
(../libsupc++/.libs/libsupc++convenience.a)atexit_thread.o
(../libsupc++/.libs/libsupc++convenience.a)atomicity.o
(../libsupc++/.libs/libsupc++convenience.a)bad_alloc.o
(../libsupc++/.libs/libsupc++convenience.a)bad_array_length.o
(../libsupc++/.libs/libsupc++convenience.a)bad_array_new.o
(../libsupc++/.libs/libsupc++convenience.a)bad_cast.o
(../libsupc++/.libs/libsupc++convenience.a)bad_typeid.o
(../libsupc++/.libs/libsupc++convenience.a)class_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)del_op.o
(../libsupc++/.libs/libsupc++convenience.a)del_ops.o
(../libsupc++/.libs/libsupc++convenience.a)del_opnt.o
(../libsupc++/.libs/libsupc++convenience.a)del_opv.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvs.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvnt.o
(../libsupc++/.libs/libsupc++convenience.a)dyncast.o
(../libsupc++/.libs/libsupc++convenience.a)eh_alloc.o
(../libsupc++/.libs/libsupc++convenience.a)eh_arm.o
(../libsupc++/.libs/libsupc++convenience.a)eh_aux_runtime.o
(../libsupc++/.libs/libsupc++convenience.a)eh_call.o
(../libsupc++/.libs/libsupc++convenience.a)eh_catch.o
(../libsupc++/.libs/libsupc++convenience.a)eh_exception.o
(../libsupc++/.libs/libsupc++convenience.a)eh_globals.o
(../libsupc++/.libs/libsupc++convenience.a)eh_personality.o
(../libsupc++/.libs/libsupc++convenience.a)eh_ptr.o
(../libsupc++/.libs/libsupc++convenience.a)eh_term_handler.o
(../libsupc++/.libs/libsupc++convenience.a)eh_terminate.o
(../libsupc++/.libs/libsupc++convenience.a)eh_tm.o
(../libsupc++/.libs/libsupc++convenience.a)eh_throw.o
(../libsupc++/.libs/libsupc++convenience.a)eh_type.o
(../libsupc++/.libs/libsupc++convenience.a)eh_unex_handler.o
(../libsupc++/.libs/libsupc++convenience.a)enum_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)function_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)fundamental_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)guard.o
(../libsupc++/.libs/libsupc++convenience.a)guard_error.o
(../libsupc++/.libs/libsupc++convenience.a)hash_bytes.o
(../libsupc++/.libs/libsupc++convenience.a)nested_exception.o
(../libsupc++/.libs/libsupc++convenience.a)new_handler.o
(../libsupc++/.libs/libsupc++convenience.a)new_op.o
(../libsupc++/.libs/libsupc++convenience.a)new_opnt.o
(../libsupc++/.libs/libsupc++convenience.a)new_opv.o
(../libsupc++/.libs/libsupc++convenience.a)new_opvnt.o
(../libsupc++/.libs/libsupc++convenience.a)new_opa.o
(../libsupc++/.libs/libsupc++convenience.a)new_opant.o
(../libsupc++/.libs/libsupc++convenience.a)new_opva.o
(../libsupc++/.libs/libsupc++convenience.a)new_opvant.o
(../libsupc++/.libs/libsupc++convenience.a)del_opa.o
(../libsupc++/.libs/libsupc++convenience.a)del_opant.o
(../libsupc++/.libs/libsupc++convenience.a)del_opsa.o
(../libsupc++/.libs/libsupc++convenience.a)del_opva.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvant.o
(../libsupc++/.libs/libsupc++convenience.a)del_opvsa.o
(../libsupc++/.libs/libsupc++convenience.a)pbase_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)pmem_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)pointer_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)pure.o
(../libsupc++/.libs/libsupc++convenience.a)si_class_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)tinfo.o
(../libsupc++/.libs/libsupc++convenience.a)tinfo2.o
(../libsupc++/.libs/libsupc++convenience.a)vec.o
(../libsupc++/.libs/libsupc++convenience.a)vmi_class_type_info.o
(../libsupc++/.libs/libsupc++convenience.a)vterminate.o
(../libsupc++/.libs/libsupc++convenience.a)cp-demangle.o
attempt to open 
../src/c++98/.libs/libc++98convenience.a succeeded
(../src/c++98/.libs/libc++98convenience.a)bitmap_allocator.o
(../src/c++98/.libs/libc++98convenience.a)pool_allocator.o
(../src/c++98/.libs/libc++98convenience.a)mt_allocator.o
(../src/c++98/.libs/libc++98convenience.a)codecvt.o
(../src/c++98/.libs/libc++98convenience.a)complex_io.o
(../src/c++98/.libs/libc++98convenience.a)globals_io.o
(../src/c++98/.libs/libc++98convenience.a)hash_tr1.o
(../src/c++98/.libs/libc++98convenience.a)hashtable_tr1.o
(../src/c++98/.libs/libc++98convenience.a)ios_failure.o
(../src/c++98/.libs/libc++98convenience.a)ios_init.o
(../src/c++98/.libs/libc++98convenience.a)ios_locale.o
(../src/c++98/.libs/libc++98convenience.a)list.o
(../src/c++98/.libs/libc++98convenience.a)list-aux.o
(../src/c++98/.libs/libc++98convenience.a)list-aux-2.o
(../src/c++98/.libs/libc++98convenience.a)list_associated.o
(../src/c++98/.libs/libc++98convenience.a)list_associated-2.o
(../src/c++98/.libs/libc++98convenience.a)locale.o
(../src/c++98/.libs/libc++98convenience.a)locale_init.o
(../src/c++98/.libs/libc++98convenience.a)locale_facets.o
(../src/c++98/.libs/libc++98convenience.a)localename.o
(../src/c++98/.libs/libc++98convenience.a)math_stubs_float.o
(../src/c++98/.libs/libc++98convenience.a)math_stubs_long_double.o
(../src/c++98/.libs/libc++98convenience.a)stdexcept.o
(../src/c++98/.libs/libc++98convenience.a)strstream.o
(../src/c++98/.libs/libc++98convenience.a)tree.o
(../src/c++98/.libs/libc++98convenience.a)istream.o
(../src/c++98/.libs/libc++98convenience.a)istream-string.o
(../src/c++98/.libs/libc++98convenience.a)streambuf.o
(../src/c++98/.libs/libc++98convenience.a)valarray.o
(../src/c++98/.libs/libc++98convenience.a)cow-istream-string.o
(../src/c++98/.libs/libc++98convenience.a)collate_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)messages_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)monetary_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)numeric_members_cow.o
(../src/c++98/.libs/libc++98convenience.a)codecvt_members.o
(../src/c++98/.libs/libc++98convenience.a)collate_members.o
(../src/c++98/.libs/libc++98convenience.a)messages_members.o
(../src/c++98/.libs/libc++98convenience.a)monetary_members.o
(../src/c++98/.libs/libc++98convenience.a)numeric_members.o
(../src/c++98/.libs/libc++98convenience.a)time_members.o
(../src/c++98/.libs/libc++98convenience.a)basic_file.o
(../src/c++98/.libs/libc++98convenience.a)c++locale.o
(../src/c++98/.libs/libc++98convenience.a)allocator-inst.o
(../src/c++98/.libs/libc++98convenience.a)concept-inst.o
(../src/c++98/.libs/libc++98convenience.a)ext-inst.o
(../src/c++98/.libs/libc++98convenience.a)misc-inst.o
(../src/c++98/.libs/libc++98convenience.a)parallel_settings.o
attempt to open 
../src/c++11/.libs/libc++11convenience.a succeeded
(../src/c++11/.libs/libc++11convenience.a)chrono.o
(../src/c++11/.libs/libc++11convenience.a)codecvt.o
(../src/c++11/.libs/libc++11convenience.a)condition_variable.o
(../src/c++11/.libs/libc++11convenience.a)cow-stdexcept.o
(../src/c++11/.libs/libc++11convenience.a)ctype.o
(../src/c++11/.libs/libc++11convenience.a)debug.o
(../src/c++11/.libs/libc++11convenience.a)functexcept.o
(../src/c++11/.libs/libc++11convenience.a)functional.o
(../src/c++11/.libs/libc++11convenience.a)futex.o
(../src/c++11/.libs/libc++11convenience.a)future.o
(../src/c++11/.libs/libc++11convenience.a)hash_c++0x.o
(../src/c++11/.libs/libc++11convenience.a)hashtable_c++0x.o
(../src/c++11/.libs/libc++11convenience.a)ios.o
(../src/c++11/.libs/libc++11convenience.a)limits.o
(../src/c++11/.libs/libc++11convenience.a)mutex.o
(../src/c++11/.libs/libc++11convenience.a)placeholders.o
(../src/c++11/.libs/libc++11convenience.a)random.o
(../src/c++11/.libs/libc++11convenience.a)regex.o
(../src/c++11/.libs/libc++11convenience.a)shared_ptr.o
(../src/c++11/.libs/libc++11convenience.a)snprintf_lite.o
(../src/c++11/.libs/libc++11convenience.a)system_error.o
(../src/c++11/.libs/libc++11convenience.a)thread.o
(../src/c++11/.libs/libc++11convenience.a)cow-locale_init.o
(../src/c++11/.libs/libc++11convenience.a)cow-shim_facets.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-hash_tr1.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-ios_failure.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-shim_facets.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-stdexcept.o
(../src/c++11/.libs/libc++11convenience.a)ctype_configure_char.o
(../src/c++11/.libs/libc++11convenience.a)ctype_members.o
(../src/c++11/.libs/libc++11convenience.a)cow-fstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-sstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-string-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-string-io-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-wstring-inst.o
(../src/c++11/.libs/libc++11convenience.a)cow-wstring-io-inst.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-locale-inst.o
(../src/c++11/.libs/libc++11convenience.a)cxx11-wlocale-inst.o
(../src/c++11/.libs/libc++11convenience.a)sso_string.o
(../src/c++11/.libs/libc++11convenience.a)ext11-inst.o
(../src/c++11/.libs/libc++11convenience.a)fstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)ios-inst.o
(../src/c++11/.libs/libc++11convenience.a)iostream-inst.o
(../src/c++11/.libs/libc++11convenience.a)istream-inst.o
(../src/c++11/.libs/libc++11convenience.a)locale-inst.o
(../src/c++11/.libs/libc++11convenience.a)ostream-inst.o
(../src/c++11/.libs/libc++11convenience.a)sstream-inst.o
(../src/c++11/.libs/libc++11convenience.a)streambuf-inst.o
(../src/c++11/.libs/libc++11convenience.a)string-inst.o
(../src/c++11/.libs/libc++11convenience.a)string-io-inst.o
(../src/c++11/.libs/libc++11convenience.a)wlocale-inst.o
(../src/c++11/.libs/libc++11convenience.a)wstring-inst.o
(../src/c++11/.libs/libc++11convenience.a)wstring-io-inst.o
attempt to open 
../src/c++17/.libs/libc++17convenience.a succeeded
(../src/c++17/.libs/libc++17convenience.a)floating_from_chars.o
(../src/c++17/.libs/libc++17convenience.a)floating_to_chars.o
(../src/c++17/.libs/libc++17convenience.a)fs_dir.o
(../src/c++17/.libs/libc++17convenience.a)fs_ops.o
(../src/c++17/.libs/libc++17convenience.a)fs_path.o
(../src/c++17/.libs/libc++17convenience.a)memory_resource.o
(../src/c++17/.libs/libc++17convenience.a)cow-fs_dir.o
(../src/c++17/.libs/libc++17convenience.a)cow-fs_ops.o
(../src/c++17/.libs/libc++17convenience.a)cow-fs_path.o
(../src/c++17/.libs/libc++17convenience.a)ostream-inst.o
(../src/c++17/.libs/libc++17convenience.a)string-inst.o
(../src/c++17/.libs/libc++17convenience.a)cow-string-inst.o
attempt to open 
../src/c++20/.libs/libc++20convenience.a succeeded
(../src/c++20/.libs/libc++20convenience.a)sstream-inst.o
attempt to open 
/tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/shcrtend.o succeeded
/tmp/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/shcrtend.o
COLLECT_GCC_OPTIONS
='-shared-libgcc' '-B' '/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/./gcc' '-nostdinc++' '-L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src' '-L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/src/.libs' '-L/tmp/4afx/4afx_adtools/native-build/gcc-cross-build-11.3.0/ppc-amigaos/clib2/libstdc++-v3/libsupc++/.libs' '-B' '/tmp/4afx/4afx_build/ppc-amigaos/bin/' '-B' '/tmp/4afx/4afx_build/ppc-amigaos/lib/' '-isystem' '/tmp/4afx/4afx_build/ppc-amigaos/include' '-isystem' '/tmp/4afx/4afx_build/ppc-amigaos/sys-include' '-mcrt=clib2' '-fPIC' '-D' 'PIC' '-D' '_GLIBCXX_SHARED' '-shared' '-nostdlib' '-mcrt=clib2' '-mcrt=clib2' '-o' '.libs/libstdc++.so' '-v' '-dumpdir' '.libs/libstdc++.so.'

The readelf -d:
Dynamic section at offset 0x243f60 contains 15 entries:
  
Tag        Type                         Name/Value
 0x0000000e 
(SONAME)                     Library soname: [libstdc++.so]
 
0x00000004 (HASH)                       0x100000d4
 0x00000005 
(STRTAB)                     0x10023f64
 0x00000006 
(SYMTAB)                     0x10008d54
 0x0000000a 
(STRSZ)                      360880 (bytes)
 
0x0000000b (SYMENT)                     16 (bytes)
 
0x00000003 (PLTGOT)                     0x1020d000
 0x00000002 
(PLTRELSZ)                   15576 (bytes)
 
0x00000014 (PLTREL)                     RELA
 0x00000017 
(JMPREL)                     0x10094df8
 0x00000007 
(RELA)                       0x1007c114
 0x00000008 
(RELASZ)                     117180 (bytes)
 
0x00000009 (RELAENT)                    12 (bytes)
 
0x6000000e (Operating System specific6000000e)        0x2
 0x00000000 
(NULL)                       0x0

Trying to figure out why, like in the LINUX version, libstdc++.so is not depending on libc / libm.

It is worth noting that the libstdc++.so built for newlib is the same too - no libc in readelf.

Question:
1. Is it expected that libstdc++.so would not be depending on libc.so? (You can see that the *LINUX* version is linked with -lm -lc - the Amiga version is not. But, if it really was needed on the Amiga version I would expect some sort of error since it was not added to the command line)
2. Why does the amiga use the shcrt* files, yet the Linux version uses crt*?
3. Can we create a discord channel to get volunteers involved?


Edited by rjd324 on 2023/3/10 16:37:54
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: The ADTOOLS thread
Just can't stay away
Just can't stay away


See User information
@rjd324
First of all you can't compare newlib with clib2 (or any other C library), newlib doesn't have a "usual" libc (it's just stub functions calling the newlib.library ones, with very few exceptions there is no code nor data in newlib's libc, it's in newlib.library instead) and no libm at all, while in clib2 the actual code is in libc/libm.
While a newlib libstdc++.so may work without NEEDED libc/libm/libgcc the clib2 one very likely can't.

(sh)crtbegin/end and differences to Unix systems:
Unix executables are started at address 0 of the code (each task has it's own virtual address space), AmigaOS4 can't do something like that (the address space is shared between all tasks) but uses the _start() function instead. _start() is in crtbegin and, among other setup tasks, calls the local constructor/destructor functions of the executable (and statically linked libraries) and IElf->InitSHLibs() for the constructor/destructor functions of shared objects used by the executable.
Shared objects don't need a _start() function but the __shlib_call_constructors() and __shlib_call_destructors() functions called by elf.library instead to call the constructor/destructor functions inside the .ctors/.dtors sections of the shared object. Because of those differences it's required to have different crtbegin/end for executables and shcrtbegin/end for shared objects.
Unix switched to using .init_array/.fini_array instead of .ctors/.dtors several years ago, which results in major differences, you can't compare the way current Unix systems use shared objects with the about 20 years old .ctors/.dtors method AmigaOS4 is still using.

Edit: The readelf output of AmigaOS version doesn't include any ctors/dtors section!? It can't work without them.
Edit2: According to https://maskray.me/blog/2021-11-07-init-ctors-init-array only MinGW and PlayStation 4 still used .ctors/.dtors instead of .init_array/.fini_array. If that's still the case 1 1/2 years later some MinGW/PS4 parts of binutils may have to be used for AmigaOS4.


Edited by joerg on 2023/3/11 7:19:50
Edited by joerg on 2023/3/11 8:03:25
Go to top
Re: The ADTOOLS thread
Just popping in
Just popping in


See User information
@joerg

I think rjd324 is even using the unreleased improved elf.library from elfpipe. And so it can even work without ctors/dtors, because as long i understood eflpipe moved the constructor/destructor handling into the elf.library. This further means, depending on how much effort elfpipe put into it, even newer mechanism can be supported by the elf.library. And additional the handling is decoupled from the used clib, it doesn't need anymore to provide __shlib_call_constructors() and __shlib_call_destructors() function.

As a last step to have the sobjs support not spread other the elf.library and the clib, would be to get rid of shcrtbegin/shcrtend files. If that could be reached sobj support on Amiga OS 4 would relay solely on OS parts. And clibs would become more "common"

Go to top
Re: The ADTOOLS thread
Amigans Defender
Amigans Defender


See User information
I think that we need to update binutils. Our are too old. This is the main problem we have now.

i'm really tired...
Go to top
Re: The ADTOOLS thread
Home away from home
Home away from home


See User information
@afxgroup
Updating binutils is more or less easy, just no need to jump on the latest ones, and figth with tons of differences, just one by one, step by step. I already made a next version after our port, together with removing of morphos, amithlon, os3 and whatever no-one-anymore-use-from-adtools code, and patches start to be much smaller, and more or less clean.

But, i just waiting a little bit as MightyMax (if i remeber right) was almost done with fresh binutils port.

@MightyMax
If you stop working on binutils port by any of reasons, or you do not know when you will have time to work on, maybe then better if i will at least made next-version jump for binutils, that will be at least something than nothing.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: The ADTOOLS thread
Just popping in
Just popping in


See User information
@kas1e

I didn't stop exactly. I just very limited time currently. I even haven't cached up with QT6 thread where i left a couple of weeks ago. I think it will even take some couple of week before i return to binutils.

Go to top
Re: The ADTOOLS thread
Just popping in
Just popping in


See User information
@afxgroup

Your definitely right a newer binutils is what we need.

Go to top
Re: The ADTOOLS thread
Just can't stay away
Just can't stay away


See User information
@MigthyMax
Quote:
I think rjd324 is even using the unreleased improved elf.library from elfpipe. And so it can even work without ctors/dtors, because as long i understood eflpipe moved the constructor/destructor handling into the elf.library.
It may work without __shlib_call_constructors() and __shlib_call_destructors(), but it can't work if the constructor/destructor function pointers are removed from the shared object, which seems to be the case according to the AmigaOS readelf output of libstdc++.so.

Quote:
This further means, depending on how much effort elfpipe put into it, even newer mechanism can be supported by the elf.library. And additional the handling is decoupled from the used clib, it doesn't need anymore to provide __shlib_call_constructors() and __shlib_call_destructors() function.
By using __shlib_call_constructors() and __shlib_call_destructors() you could switch from .ctors/.dtors to .init_array/.fini_array without requiring a beta elf.library, only shcrtbegin/end of the C libraries have to be updated which can be done by everyone and you can release software using the new method without having to wait until there is a public update of elf.library (if there ever will be any at all).

IMHO the main problem is that he is tying to use GCC 11.3 and binutils 2.23.2 (+ maybe beta elf.library).
It's known that that doesn't work currently. What should be done instead is
- test GCC 11.3 with binutils 2.14.x
- test GCC 3.4.x with binutils 2.23.2
If one of both works it's much easier to update the AmigaOS4 parts.
binutils definitely needs updates in the AmigaOS4 parts, but I'd be very surprised if current GCC versions work without changes in the AmigaOS4 parts.
First getting current versions of GCC work with binutils 2.14.x
(if it doesn't already work) and only after that updating binutils should be the easiest way. But in any case do it one by one, either first get current GCC or first current binutils working correctly on AmigaOS4, not both at once.
Additionally not trying to update the last known working version (in case of GCC that should be version 3.4.x or maybe 4.0.x) directly to the current version, but for example first GCC to 6.x, then to 8.x, 10.x, etc. would make it much easier to find out by which changes the ancient AmigaOS4 parts stopped working as indented and to update them.

Go to top
Re: The ADTOOLS thread
Quite a regular
Quite a regular


See User information
At the minute there is this repository:
https://github.com/3246251196/adtools_testing.git

If you clone that and just run the script named "4afx" script it will do what is says in the README.md file.

Quote:

This will checkout ADTOOLS building GCC 11 and BINUTILS 2.23.2 using AFXGROUP's CLIB2.
It also makes the following modifications:
- Copies over the AMIGAOS.H file from AFXGROUP's CLIB2 to the GCC rs6000 (linker script);
- Currently hacks out -Werror in AFXGROUP's CLIB2 due to an issue with timeval cast;
- Forces the creation of AFXGROUP'S CLIB2 shared libraries;


It will then run some tests in the tests folder which I welcome anyone to add to.

===

The readelf description that I gave above for the "libstdc++.so" build with clib2 still stands (see above).

Though, when creating some silly test that I added into "tests" I see the following log; this log includes the verbose compilation log, linking log and finally the readelf for the created executable of the test:
#####
Compile phase for main_with_use_dynld_.o
#####
Using built-in specs.
COLLECT_GCC=ppc-amigaos-g++
Targetppc-amigaos
Configured with
: /home/rjd/projects/adtools_test/build/4afx/4afx_adtools/gcc/repo/configure --with-bugurl=https://github.com/sba1/adtools/issues --with-pkgversion='adtools build 11.3.0' --target=ppc-amigaos --prefix=/home/rjd/projects/adtools_test/build/4afx/4afx_build --enable-languages=c,c++ --enable-haifa --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-tls --enable-threads=amigaos --enable-lto --disable-c++tools
Thread modelamigaos
Supported LTO compression algorithms
zlib
gcc version 11.3.0 
(adtools build 11.3.0
COLLECT_GCC_OPTIONS='-mcrt=clib2' '-Wall' '-Werror' '-Wpedantic' '-std=c++11' '-v' '-c' '-o' 'main_with_use_dynld_.o'
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/libexec/gcc/ppc-amigaos/11.3.0/cc1plus -quiet --imultilib clib2 -idirafter /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/include -idirafter /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/include -idirafter /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/include/include_h -idirafter /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/include/netinclude -idirafter /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/include main.cpp -quiet -dumpbase main_with_use_dynld_.cpp -dumpbase-ext .cpp -mcrt=clib2 -Wall -Werror -Wpedantic -std=c++11 -version -/tmp/ccvjRCNn.s
GNU C
++11 (adtools build 11.3.0version 11.3.0 (ppc-amigaos)
    
compiled by GNU C version 11.3.0GMP version 6.2.1MPFR version 4.1.0MPC version 1.2.1isl version none
GGC heuristics
: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring non
-existent directory "/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/sys-include"
ignoring non-existent directory "/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/include"
ignoring non-existent directory "/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/include"
#include "..." search starts here:
#include <...> search starts here:
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/include/c++/11.3.0
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/include/c++/11.3.0/ppc-amigaos/clib2
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/include/c++/11.3.0/backward
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/include
 /
home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/include-fixed
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/include
 /
home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/include
 /
home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/include/include_h
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/include/netinclude
End of search 
list.
GNU C++11 (adtools build 11.3.0version 11.3.0 (ppc-amigaos)
    
compiled by GNU C version 11.3.0GMP version 6.2.1MPFR version 4.1.0MPC version 1.2.1isl version none
GGC heuristics
: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum
15529d9e6649ec84a01b7a231c1a8f91
COLLECT_GCC_OPTIONS
='-mcrt=clib2' '-Wall' '-Werror' '-Wpedantic' '-std=c++11' '-v' '-c' '-o' 'main_with_use_dynld_.o'
 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/bin/as -mppc -mbig -o main_with_use_dynld_./tmp/ccvjRCNn.s
COMPILER_PATH
=/home/rjd/projects/adtools_test/build/4afx/4afx_build/libexec/gcc/ppc-amigaos/11.3.0/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/libexec/gcc/ppc-amigaos/11.3.0/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/libexec/gcc/ppc-amigaos/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/bin/
LIBRARY_PATH=/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/lib/clib2/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/:/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/lib/
COLLECT_GCC_OPTIONS='-mcrt=clib2' '-Wall' '-Werror' '-Wpedantic' '-std=c++11' '-v' '-c' '-o' 'main_with_use_dynld_.o' '-dumpdir' 'main_with_use_dynld_.'
#####
Link phase for main_with_use_dynld_.exe
#####
GNU ld (GNU Binutils2.23.2
  Supported emulations
:
   
amigaos
   elf32ppc
using internal linker script
:
==================================================
/* Default linker script, for normal executables */
OUTPUT_FORMAT("elf32-amigaos""elf32-amigaos",
          
"elf32-amigaos")
OUTPUT_ARCH(powerpc)
ENTRY(_start)
SEARCH_DIR("/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/lib");
PROVIDE (__stack 0); PROVIDE (___stack 0);
SECTIONS
{
  
/* Read-only sections, merged into text segment: */
  
PROVIDE (__executable_start 0x01000000); . = 0x01000000 SIZEOF_HEADERS;
  .
interp         : { *(.interp) }
  .
note.gnu.build-id : { *(.note.gnu.build-id) }
  .
hash           : { *(.hash) }
  .
gnu.hash       : { *(.gnu.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.ro   : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
  .
rela.data.rel.ro   : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
  .
rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
  .
rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
  .
rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
  .
rela.tdata      : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
  .
rel.tbss      : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
  .
rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
  .
rel.ctors      : { *(.rel.ctors) }
  .
rela.ctors     : { *(.rela.ctors) }
  .
rel.dtors      : { *(.rel.dtors) }
  .
rela.dtors     : { *(.rela.dtors) }
  .
rel.got        : { *(.rel.got) }
  .
rela.got       : { *(.rela.got) }
  .
rela.got1           : { *(.rela.got1) }
  .
rela.got2           : { *(.rela.got2) }
  .
rel.sdata      : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
  .
rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
  .
rel.sbss       : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
  .
rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
  .
rel.sdata2     : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
  .
rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
  .
rel.sbss2      : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
  .
rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
  .
rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
  .
rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
  .
rel.plt        : { *(.rel.plt) }
  .
rela.plt       : { *(.rela.plt) }
  .
init           :
  {
    
KEEP (*(.init))
  } =
0
  
.text           :
  {
    *(.
text .stub .text.* .gnu.linkonce.t.*)
    
KEEP (*(.text.*personality*))
    
/* .gnu.warning sections are handled specially by elf32.em.  */
    
*(.gnu.warning)
    *(.
glink)
  } =
0
  
. = ALIGN(4096);
  .
plt            :  { *(.plt) }
  . = 
ALIGN(4096);
  .
fini           :
  {
    
KEEP (*(.fini))
  } =
0
  PROVIDE 
(__etext = .);
  
PROVIDE (_etext = .);
  
PROVIDE (etext = .);
  .
rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  .
rodata1        : { *(.rodata1) }
  .
sdata2         :
  {
    
PROVIDE (_SDA2_BASE_ 32768);
    *(.
sdata2 .sdata2.* .gnu.linkonce.s2.*)
  }
  .
sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
  .
eh_frame_hdr : { *(.eh_frame_hdr) }
  .
eh_frame       ONLY_IF_RO KEEP (*(.eh_frame)) }
  .
gcc_except_table   ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  
/* 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 (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  
/* Exception handling  */
  
.eh_frame       ONLY_IF_RW KEEP (*(.eh_frame)) }
  .
gcc_except_table   ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  
/* Thread Local Storage sections  */
  
.tdata      : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  .
tbss          : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  .
preinit_array     :
  {
    
PROVIDE_HIDDEN (__preinit_array_start = .);
    
KEEP (*(.preinit_array))
    
PROVIDE_HIDDEN (__preinit_array_end = .);
  }
  .
init_array     :
  {
     
PROVIDE_HIDDEN (__init_array_start = .);
     
KEEP (*(SORT(.init_array.*)))
     
KEEP (*(.init_array))
     
PROVIDE_HIDDEN (__init_array_end = .);
  }
  .
fini_array     :
  {
    
PROVIDE_HIDDEN (__fini_array_start = .);
    
KEEP (*(.fini_array))
    
KEEP (*(SORT(.fini_array.*)))
    
PROVIDE_HIDDEN (__fini_array_end = .);
  }
  .
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))
    
KEEP (*crtbegin?.o(.ctors))
    
/* We don't want to include the .ctor section 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.*crtend?.) .ctors))
    
KEEP (*(SORT(.ctors.*)))
    
KEEP (*(.ctors))
  }
  .
dtors          :
  {
    
KEEP (*crtbegin.o(.dtors))
    
KEEP (*crtbegin?.o(.dtors))
    
KEEP (*(EXCLUDE_FILE (*crtend.*crtend?.) .dtors))
    
KEEP (*(SORT(.dtors.*)))
    
KEEP (*(.dtors))
  }
  .
jcr            : { KEEP (*(.jcr)) }
  .
data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
  .
fixup          : { *(.fixup) }
  .
got1           : { *(.got1) }
  .
got2           : { *(.got2) }
  .
dynamic        : { *(.dynamic) }
  .
got            SPECIAL { *(.got) }
  . = 
DATA_SEGMENT_RELRO_END (0, .);
  .
data           :
  {
    
_DATA_BASE_ = .;
    *(.
data .data.* .gnu.linkonce.d.*)
    
KEEP (*(.gnu.linkonce.d.*personality*))
    
SORT(CONSTRUCTORS)
  }
  .
data1          : { *(.data1) }
  .
got            SPECIAL { *(.got) }
  
/* 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          :
  {
    
_SDA_BASE_ = . + 0x8000;
    *(.
sdata .sdata.* .gnu.linkonce.s.*)
  }
  
_edata = .; PROVIDE (edata = .);
  
__bss_start = .;
  .
sbss           :
  {
    
PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
    *(.
dynsbss)
    *(.
sbss .sbss.* .gnu.linkonce.sb.*)
    *(.
scommon)
    
PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
  }
  .
bss            :
  {
   *(.
dynbss)
   *(.
bss .bss.* .gnu.linkonce.b.*)
   *(
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.
      FIXME: Why do we need it? When there is no .bss section, we don't
      pad the .data section.  */
   
. = ALIGN(. != 16 1);
  }
  . = 
ALIGN(16);
  . = 
ALIGN(16);
  
__end = .;
  
_end = .; PROVIDE (end = .);
  . = 
DATA_SEGMENT_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 .gnu.linkonce.wi.*) }
  .
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) }
  
/* DWARF 3 */
  
.debug_pubtypes 0 : { *(.debug_pubtypes) }
  .
debug_ranges   0 : { *(.debug_ranges) }
  .
gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  /
DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
}


==================================================
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/gthr-amigaos-native.o succeeded
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/gthr-amigaos-native.o
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crtbegin.o succeeded
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crtbegin.o
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crt0.o succeeded
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crt0.o
attempt to open main_with_use_dynld_
.o succeeded
main_with_use_dynld_
.o
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libstdc++.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libstdc++.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib/libstdc++.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib/libstdc++.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib/libstdc++.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib/libstdc++.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib/libstdc++.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib/libstdc++.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/libstdc++.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/libstdc++.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/lib/clib2/libstdc++.so succeeded
-lstdc++ (/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/../../../../ppc-amigaos/lib/clib2/libstdc++.so)
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libm.so succeeded
-lm (/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libm.so)
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/libgcc.so succeeded
-lgcc (/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/libgcc.so)
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libc.so succeeded
-lc (/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libc.so)
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/clib2/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib/libgcc.so failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/local/common/lib/libgcc.a failed
attempt to open 
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/libgcc.so succeeded
-lgcc (/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/libgcc.so)
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crtend.o succeeded
/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crtend.o
#####
ppc-amigaos-readelf -for main_with_use_dynld_.exe
#####

Dynamic section at offset 0x614c contains 21 entries:
  
Tag        Type                         Name/Value
 0x00000001 
(NEEDED)                     Shared library: [libstdc++.so]
 
0x00000001 (NEEDED)                     Shared library: [libm.so]
 
0x00000001 (NEEDED)                     Shared library: [libgcc.so]
 
0x00000001 (NEEDED)                     Shared library: [libc.so]
 
0x0000000c (INIT)                       0x1002644
 0x0000000d 
(FINI)                       0x10026ec
 0x00000004 
(HASH)                       0x1000108
 0x00000005 
(STRTAB)                     0x100067c
 0x00000006 
(SYMTAB)                     0x100029c
 0x0000000a 
(STRSZ)                      1060 (bytes)
 
0x0000000b (SYMENT)                     16 (bytes)
 
0x00000015 (DEBUG)                      0x0
 0x00000003 
(PLTGOT)                     0x1005000
 0x00000002 
(PLTRELSZ)                   228 (bytes)
 
0x00000014 (PLTREL)                     RELA
 0x00000017 
(JMPREL)                     0x1000b00
 0x00000007 
(RELA)                       0x1000aa0
 0x00000008 
(RELASZ)                     324 (bytes)
 
0x00000009 (RELAENT)                    12 (bytes)
 
0x6000000e (AMIGAOS_DYNVERSION)         0x2
 0x00000000 
(NULL)                       0x0


The executable does now rely on the shared libraries we expected would be needed in the "standalone" libstdc++.so.

===

If all of this is merely academic because the first thing we must to is upgrade binutils then that is fine. That will be the task. I just wanted the opinion of others.

Thanks.

Btw, that repository at the top of this post I welcome anyone to run in case it helps.

===
FYI: I am not a beta tester, I only have the stock machine and stock libraries. Which is actually useful since most devs have all of these later libraries. It is good for someone to have "stock". This means I have no such updated elf.library.

EDIT: 13/March/23 (Added):
===
At the moment, when building the single test exectuable (test in directory named "1" in tests) I notice that it is linked with crtbegin/crtend. You can see it in the log file in the verbose link phase section:
Quote:

/home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crtend.o - which is not the same as that used for the libstdc++.so (which uses the shcrtbegin/end)

This is not what the Linux version does. The libstdc++.so is linked with crtbeginS/end (shared version, hence the S) and so is the test binary. I notice that when I add "-shared" in the ppc-amigaos-g++ command then the shcrtbegin/end files are used. This is probably due to the linker script copied over which only uses those when the shared option is provided.

When copying the test executable and running it (also having copied the NEEDED so into PROGDIR:, I get a GURU).

When I rebuild the test exectuable using the "-shared" option in the ppc-amigaos-g++ driver, I get zero output. Looks like the executable runs but I am back on the shell and it is waiting for the next command - nothing printed to the screen.

But:
===
Quote:

IMHO the main problem is that he is tying to use GCC 11.3 and binutils 2.23.2 (+ maybe beta elf.library).
It's known that that doesn't work currently. What should be done instead is
- test GCC 11.3 with binutils 2.14.x
- test GCC 3.4.x with binutils 2.23.2
If one of both works it's much easier to update the AmigaOS4 parts.
binutils definitely needs updates in the AmigaOS4 parts, but I'd be very surprised if current GCC versions work without changes in the AmigaOS4 parts.
First getting current versions of GCC work with binutils 2.14.x
(if it doesn't already work) and only after that updating binutils should be the easiest way. But in any case do it one by one, either first get current GCC or first current binutils working correctly on AmigaOS4, not both at once.
Additionally not trying to update the last known working version (in case of GCC that should be version 3.4.x or maybe 4.0.x) directly to the current version, but for example first GCC to 6.x, then to 8.x, 10.x, etc. would make it much easier to find out by which changes the ancient AmigaOS4 parts stopped working as indented and to update them.

Then, maybe I look into testing the suggestions you made. As you said, if this combination is KNOWN to be broken, then it is pointless posting more information and asking questions on something that is already known not to work.


Edited by rjd324 on 2023/3/13 18:21:17
Edited by rjd324 on 2023/3/13 18:22:02
Edited by rjd324 on 2023/3/13 18:23:30
Edited by rjd324 on 2023/3/13 18:28:33
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: The ADTOOLS thread
Quite a regular
Quite a regular


See User information
@Joerg
See my comment above, but the [cd]tors are there, just only when finally linking an executable using -with-dynld. They are just not in the libstdc++.so SO.

I noticed that when using newlib, the single test in my adtools_test repo works with SO.

Anyway, I may look into adding brining BINUTILS 2.14 into the ADTOOLS via a branch or something. The old SVN repo contains an older version - 2.18. A few revisions further back and it is basically 2.14.

When you say
Quote:

It's known that that doesn't work currently.


what specifically is known. As I see when building with newlib and using GCC 11.3 and BINUTILS 2.23.2 then SO are working. For w/e reason, I am also under the impression that later BINUTILS did not ditch the older [cd]tors way of startup/fini but just deprecated it.


Edited by rjd324 on 2023/3/14 4:19:42
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: The ADTOOLS thread
Just can't stay away
Just can't stay away


See User information
@rjd324
Quote:
See my comment above, but the [cd]tors are there, just only when finally linking an executable using -with-dynld. They are just not in the libstdc++.so SO.
The libstdc++.so [cd]tors have to be inside libstdc++.so, just like in the Linux version.
The difference is just that the Linux version use the newer method and has them in .init/.fini_array in the readelf output and the AmigaOS4 version would have to have them in .ctors/.dtors instead using the older method, but there is no CTORS/DTORS section in the AmigaOS4 readelf output (and no INIT/FINI_ARRAY sections either).

Quote:
As I see when building with newlib and using GCC 11.3 and BINUTILS 2.23.2 then SO are working.
Did I get the QT6 thread completely wrong? I thought it doesn't work with newlib either and that's the reason a beta elf.library with some workarounds was createad?

If it's working correctly with newlib there are only a few possible reasons why it doesn't work with clib2:
- something is wrong in the clib2 amigaos.h you are using
- bugs in the clib2 (sh)crtbegin/end code or arrays
- bugs in the clib2 parts of the linker scripts

I did build a shared object version of clib2 about 15-20 years ago and added the required support in my local linker scripts (binutils 2.14.x). IIRC just using a 1:1 copy of the newlib shared objects parts didn't work but it required some clib2 specific changes in the linker scripts to get it working correctly.

Quote:
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/gthr-amigaos-native.o succeeded
/home/rjd/projects/adtools_test/build/4afx/4afx_build/lib/gcc/ppc-amigaos/11.3.0/clib2/gthr-amigaos-native.o
attempt to open /home/rjd/projects/adtools_test/build/4afx/4afx_build/ppc-amigaos/SDK/clib2/lib/crtbegin.o succeeded
I don't know what gthr-amigaos-native is. Make sure it doesn't include any constructors or descructors, there never must by any before the ctor array in (sh)crtbegion.o is linked into an executable or shared object.
The -use-dynld option seems to be missing in the g++ command line?

Quote:
At the moment, when building the single test exectuable (test in directory named "1" in tests) I notice that it is linked with crtbegin/crtend. ...
This is not what the Linux version does. The libstdc++.so is linked with crtbeginS/end (shared version, hence the S) and so is the test binary. I notice that when I add "-shared" in the ppc-amigaos-g++ command then the shcrtbegin/end files are used. This is probably due to the linker script copied over which only uses those when the shared option is provided.
Linux works differently.
On AmigaOS4 shared objects have to be linked with shcrtbegin.o and shcrtend.o (gcc -shared ...) but the executables have to be linked with crtbegin.o and crtend.o instead, no matter if using static or shared linking (for using shared objects gcc -use-dynld ... has to be used).


Edited by joerg on 2023/3/14 6:44:09
Go to top
Re: The ADTOOLS thread
Amigans Defender
Amigans Defender


See User information
Shared objects now with new unreleased elf library are working correctly. Everything is in shcrbegin/end and libraries are created correctly. Of course you have to change amigaos.h file like newlib one to use -use-dynld/-shared

But I suspect always that binutils sometimes do something wrong. Don't know what or when but I'm pretty sure that there is something that doesn't work correctly

i'm really tired...
Go to top
Re: The ADTOOLS thread
Quite a regular
Quite a regular


See User information
Quote:

The libstdc++.so [cd]tors have to be inside libstdc++.so, just like in the Linux version.

Okay. Well, they are currently not.

Quote:

Did I get the QT6 thread completely wrong?

I do not know. All I know is that I have a test program that when built with newlib and using -use-dynld and copying that exe and the SO to the same PROGDIR: the programs runs fine.

What I also see is that the "libstdc++.so" for newlib looks the same as the clib one - there are no NEEDED sections when viewing readelf. If this is expected, then fine. Again, the NEEDED sections only come out when finally linking the test executable.

Quote:

I don't know what gthr-amigaos-native is.

This is the c++ threading object file and is always linked with when you use -athread=native.

Quote:

The -use-dynld option seems to be missing in the g++ command line?

It is not in the compiler phase collection options. It is only used in $(LDFLAGS) which is passed to "ld". As far as I am aware, this option is only of use when using "ld". Hence, it is not clearly visible, though, I expected -Wl,--verbose to display it.

Quote:

Linux works differently.
On AmigaOS4 shared objects have to be linked with shcrtbegin.o and shcrtend.o (gcc -shared ...) but the executables have to be linked with crtbegin.o and crtend.o instead, no matter if using static or shared linking (for using shared objects gcc -use-dynld ... has to be used).

Understood.

===

Quote:

Shared objects now with new unreleased elf library are working correctly. Everything is in shcrbegin/end and libraries are created correctly. Of course you have to change amigaos.h file like newlib one to use -use-dynld/-shared

You have the ability to see what I am doing in the repository references above. From what you have just said, it sounds like the only thing necessary is to copy over the "amigaos.h" in your CLIB2 repo and copy it over the rs6000/amigaos.h file in the ADTOOLS GCC repo. Well, I am doing that, and I am using CLIB2 master. In that case, it sounds like we need to update the ADTOOLS repo to either make a further patch to the GCC repo to update the amigaos.h file, or, to hack this in to the makefile and force the copy if EXP_CLIB2 is set.

From what you currently say, if I had a copy of the new elf.library, cloned my repo linked above, ran the 4afx script (which builds the tests), copy over the test(s) [since there is only 1, and I welcome anyone to add more] to my X5000 including their "NEEDED" SO files - then I would be able successfully run the test.

What I do not understand is that we have someone saying that libstdc++.so CANNOT work if it is not linking with c, gcc etc, and yet we have you who is saying that everything works: when I say everything - I mean being able to invoke a test program using shared libraries and ... it running; not that binutils is perfect or anything.

This is why I created the thread anyway, just so that we can converge on clarity. Let me if I have misunderstood something.

Thanks.


Edited by rjd324 on 2023/3/14 17:28:35
Edited by rjd324 on 2023/3/14 19:09:36
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: The ADTOOLS thread
Just can't stay away
Just can't stay away


See User information
@rjd324
Quote:
What I do not understand is that we have someone saying that libstdc++.so CANNOT work if it is not linking with c, gcc etc, and yet we have you who is saying that everything works: when I say everything - I mean being able to invoke a test program using shared libraries and ... it running; not that binutils is perfect or anything.
I wrote it very likely doesn't work without the NEEDED parts in SOs with clib2 (but I'm not 100% sure), but it should work with newlib instead - unless one of the very few libc functions which isn't just a foobar() stub calling INewlib->foobar() but includes actual code and/or data in libc.so is used, in which case the newlib version probably doesn't work either.

afxgroup wrote as well that it does not work - unless he is using a beta elf.library.
If it only works with clib2 using a beta elf.library but not with the public elf.library something is definitely wrong in the clib2 support, either in the clib2 (sh)crtbegin/end code or arrays, or some of the clib2 parts of the linker scripts.

Are the sources of gthr-amigaos-native.c, clib2 amigaos.h, clib2 (sh)crtbegin/end.c and the clib2 linker scripts available online somewhere, displayable using a web browser?
If yes I could check them, but I don't have the time to checkout code using CVS/SVN/GIT/whatever.

Go to top
Re: The ADTOOLS thread
Quite a regular
Quite a regular


See User information
@joerg

CLIB2 shcrt(begin|end).c
https://github.com/afxgroup/clib2/blob/master/library/shcrtbegin.c
https://github.com/afxgroup/clib2/blob/master/library/shcrtend.c

amigaos.h (rs6000 replacement):
https://github.com/afxgroup/clib2/blob/master/misc/amigaos.h

gthr-amigaos-native.c: (Remember that the new ADTOOLS brings in the patching system using GILD, so that a base repo is checked out and patches are applied on top of that. For that reason, I can only reference a patch file, but it shows the entire source):
https://github.com/sba1/adtools/blob/m ... s-thread-model.patch#L300

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: The ADTOOLS thread
Amigans Defender
Amigans Defender


See User information
@joerg

Even Timberwolf wasn't working anymore that was using newlib shared objects. So most probably something has changed in elf.library during years. As you can see from the github files. shcrtbegin/end works like in newlib.
So the problem is in binutils or elf.library. maybe in both but now with the fixed elf.library code works correctly and as it should

i'm really tired...
Go to top
Re: The ADTOOLS thread
Just can't stay away
Just can't stay away


See User information
shcrtbegin.c:
static void (*__CTOR_LIST__[1])(void__attribute__((section(".ctors")));
static 
void (*__DTOR_LIST__[1])(void__attribute__((section(".dtors")));
should be
static void (*__CTOR_LIST__[1])(void__attribute__((section(".ctors"))) = {(void *)~0};
static 
void (*__DTOR_LIST__[1])(void__attribute__((section(".dtors")))= {(void *)~0};
instead.

extern void (*__CTOR_LIST__[])(void); in __shlib_call_constructors() and extern void (*__DTOR_LIST__[])(void); in __shlib_call_destructors() should be removed.

shcrtend.c:
static void (*__CTOR_LIST__[1])(void__attribute__((usedsection(".ctors")));
static 
void (*__DTOR_LIST__[1])(void__attribute__((usedsection(".dtors")));
should be changed to
static void (*__CTOR_LIST__[1])(void__attribute__((usedsection(".ctors"))) = {NULL};
static 
void (*__DTOR_LIST__[1])(void__attribute__((usedsection(".dtors"))) = {NULL};


amigaos.h / linker scripts:
%(link_thread) in LINK_SPEC seems to be inserted too early, before startfile is used. Should be changed to make sure link_thread is used between startfile and endfile.


Edited by joerg on 2023/3/15 16:45:32
Go to top
Re: The ADTOOLS thread
Quite a regular
Quite a regular


See User information
@afxgroup

Is it possible to consider the response from @Joerg?

It is useful to talk openly in this thread versus silo-d Discord discussion (though that is necessary and useful too).

I would like to be able to make a PR to ADTOOLS to start using this amigaos.h file.

But, I would also like someone to add tests to https://github.com/3246251196/adtools_testing to prove the SO works for newlib and clib2. Then, I can even make another PR to add those tests to ADTOOLS.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: The ADTOOLS thread
Amigans Defender
Amigans Defender


See User information
@joerg

Well, that was the newlib code and even for the amigaos.h file.. However i'll try it

@rjd324
Let me try it

i'm really tired...
Go to top
Re: The ADTOOLS thread
Amigans Defender
Amigans Defender


See User information
Changing the constructors/destructors in that way cause the crash again in the elf.library that cause an ISI.
The code I'm using at moment is that one used in newlib

And regard the %(link_thread), using -Wl,--verbose I think will only move gthread-amigaos.o to the end and nothing else since sh/crtbegin is the first file and sh/crtend is the latest one

i'm really tired...
Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project