public inbox for
 help / color / mirror / Atom feed
* Re: Hi Tom , May I ask two questions about gdb compiling
       [not found] <9E8E160C0BCE694BA44854DA190BB1C41FC46B61@CN-EX-MB-002.NCIC.local>
@ 2021-05-03  6:35 ` Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-05-03  6:35 UTC (permalink / raw)
  To: LV, XIAN; +Cc: gdb

[ CC-ing gdb mailing list ]

On 5/3/21 7:26 AM, LV, XIAN wrote:
> Dear Tom,
>     Sorry for disturbing.
>     Now I try to compile the gdb-10.2 which downloaded from official
> website and the compiling is successful.
>>>>./configure --target=aarch64-linux-gnu --host=aarch64-linux-gnu
> --build=x86_64-linux-gnu --prefix=/home/rex/gdb-10.2
> But there are two questions:
> *1.  How can I modify the path of dynamic interpreter:*
> rex@rex-desktop:/project/gdb-10.2/build$ file gdb/gdb
> gdb/gdb: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux),
> dynamically linked, interpreter */lib/,* for
> GNU/Linux 3.7.0, BuildID[sha1]=1f80eff7276d6bb5ee3482675502770887a210f2,
> with debug_info, not stripped
> from */lib/ to /system/bin/linker64*


I did the following experiment:
$ gcc ~/hello.c -g
$ ldd ./a.out (0x00007ffe353ca000) => /lib64/ (0x00007f7bebbdb000)
        /lib64/ (0x00007f7bebf96000)
$ /lib64/ --list ./a.out (0x00007ffd02126000) => /lib64/ (0x00007f88ba87f000)
        /lib64/ (0x00007f88bac3a000)
$ /lib64/ --list ./a.out (0x00007ffe875fb000) => /lib64/ (0x00007f6588a61000)
        /lib64/ => /lib64/

So, ISTM that you can override the dynamic linker used by adding it on
the command line before the command you're trying to run.

> *2. How can I compile the gdb tools with all dynamic library included in
> the gdb execution file (Just use the libraries in static way)*
>     Thank you so much.

No idea.  It may be possible.  OTOH, it may be a better idea to look
into concepts like containers, if your actual concern is to be able to
package an executable with all its dependencies.

[ FWIW, note btw that both your questions are more related to using
linux than to gdb itself.  So perhaps you'll able to find more or more
elaborate answers to your questions in the generic information available
for linux. ]

- Tom

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-03  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <9E8E160C0BCE694BA44854DA190BB1C41FC46B61@CN-EX-MB-002.NCIC.local>
2021-05-03  6:35 ` Hi Tom , May I ask two questions about gdb compiling Tom de Vries

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).