Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.development > #8922
| From | "Rod Pemberton" <boo@fasdfrewar.cdm> |
|---|---|
| Newsgroups | alt.os.development |
| Subject | Re: cross compiler can't produce dynamic library |
| Date | 2015-10-25 17:27 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <op.x62y8qt7yfako5@localhost> (permalink) |
| References | <0c6f1e58-16cb-4b7b-adf7-82dfd7e5e75c@googlegroups.com> |
On Sun, 25 Oct 2015 15:53:14 -0400, Peter Cheung <mcheung63@gmail.com> wrote: > What is the reason of my cross compiler can't produce dynamic library, the lib was compiled by : > > $(CC) -I$(NEWLIB_DIR)/include -Wall -fPIC -c testingLibrary.c > $(CC) -Wall -shared -o libTesting.so testingLibrary.o > > $ngLibrary>file testingLibrary.o > testingLibrary.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped > > $file libTesting.so > libTesting.so: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, > not stripped <-- see? > > > $i586-peter-elf-gcc -v > Using built-in specs. > COLLECT_GCC=i586-peter-elf-gcc > COLLECT_LTO_WRAPPER=/toolchain/libexec/gcc/i586-peter-elf/5.2.0/lto-wrapper > Target: i586-peter-elf > Configured with: ../gcc-5.2.0/configure --target=i586-peter-elf --prefix=/toolchain --disable-nls > --enable-languages=c,c++ --without-headers --with-gmp=/opt/local --with-newlib > Thread model: single > gcc version 5.2.0 (GCC) > There is a '-static' option for GNU LD (linker): ftp://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html#SEC3 The GCC man page "Link Options" lists '-static', '-static-libcc', '-static-libstdc++', '-pie', '-nostdlib', '-nodefaultlibs', and 'rdynamic' etc: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html Rod Pemberton -- When El Chapo is the most beloved man in Mexico and Trump is the most hated man, it shows that Mexico is truly fouled up.
Back to alt.os.development | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
cross compiler can't produce dynamic library Peter Cheung <mcheung63@gmail.com> - 2015-10-25 12:53 -0700
Re: cross compiler can't produce dynamic library "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-25 17:27 -0400
Re: cross compiler can't produce dynamic library Peter Cheung <mcheung63@gmail.com> - 2015-10-26 02:59 -0700
Re: cross compiler can't produce dynamic library Peter Cheung <mcheung63@gmail.com> - 2015-10-26 22:50 -0700
csiph-web