From: fei ding <fdingiit@gmail.com>
To: gdb@sourceware.org
Subject: How to compile a static gdb-server?
Date: Wed, 21 Jan 2015 05:40:00 -0000 [thread overview]
Message-ID: <CAGmPkf+8Vg7xbhLHwYeVJn5MyxhrtHa74fk4P7XLi-4o6kpeQA@mail.gmail.com> (raw)
Hey guys:
I need to compile a static gdb-server, which LDFLAGS=-static in
makefile, but it fails like this:
gcc -shared -fPIC -Wl,--no-undefined -g -O2 -I. -I. -I./../common
-I./../regformats -I./.. -I./../../include -I./../gnulib/import
-Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body
-DGDBSERVER \
-static -Wl,--dynamic-list=./proc-service.list -o
libinproctrace.so ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o
regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o
print-utils-ipa.o rsp-low-ipa.o amd64-linux-ipa.o linux-amd64-ipa.o
-ldl -pthread
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/crtbeginT.o: relocation
R_X86_64_32 against `__DTOR_END__' can not be used when making a
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.6/crtbeginT.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libinproctrace.so] Error 1
How can I make it?
Thanks a lot.
next reply other threads:[~2015-01-21 5:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-21 5:40 fei ding [this message]
2015-01-21 5:59 ` Ofir Cohen
2015-01-21 16:47 ` Stan Shebs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGmPkf+8Vg7xbhLHwYeVJn5MyxhrtHa74fk4P7XLi-4o6kpeQA@mail.gmail.com \
--to=fdingiit@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox