From: Jeffrey Walton <noloader@gmail.com>
To: ckim@etri.re.kr
Cc: libc-help <libc-help@sourceware.org>
Subject: Re: undefined reference to symbol 'dlsym@@GLIBC_2.2.5' during qemu build
Date: Tue, 25 May 2021 21:48:44 -0400 [thread overview]
Message-ID: <CAH8yC8khDrLNNMzUQvYQOXoKU2C0jgt33L=7qEhY8xz+ikEnag@mail.gmail.com> (raw)
In-Reply-To: <029401d751cc$c9692b50$5c3b81f0$@etri.re.kr>
On Tue, May 25, 2021 at 9:29 PM Chan Kim via Libc-help
<libc-help@sourceware.org> wrote:
>
> Hi, Florian
>
> Yes,as you said, the '-ldl' option was being ignored I guess.
> I copied the last link command and in it, moved the -ldl option to the end.
> When I separately run this modified last command, the final target
> qemu-system-aarch64 is built without error message.
> Now I have to figure out how to make '-Wl,as-needed' as not default or
> automatically place the -ld option to the last in qemu-5.1.0 build system.
> (And the debugger(ddd with gdb inside) prompt is a wait pointer. I can see
> prints when the program runs))
> Anyway thanks a lot for the help.
The make recipe is off a bit.
Ld is a single pass linker. -ldl needs to be near the end of the list
of object files and libraries, not the beginning. I.e., it should be
something like:
foo: <objs>
$(CC) $(CFLAGS) <objs> $(LDFLAGS) $(LDLIBS) -ldl
Jeff
next prev parent reply other threads:[~2021-05-26 1:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 4:47 ckim
2021-05-25 7:36 ` Florian Weimer
2021-05-25 12:17 ` ckim
2021-05-25 12:21 ` Florian Weimer
2021-05-26 1:16 ` ckim
2021-05-26 1:48 ` Jeffrey Walton [this message]
2021-05-26 4:57 ` ckim
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='CAH8yC8khDrLNNMzUQvYQOXoKU2C0jgt33L=7qEhY8xz+ikEnag@mail.gmail.com' \
--to=noloader@gmail.com \
--cc=ckim@etri.re.kr \
--cc=libc-help@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).