This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/24037] New: dl_main in --list mode quits at first undefined symbol


https://sourceware.org/bugzilla/show_bug.cgi?id=24037

            Bug ID: 24037
           Summary: dl_main in --list mode quits at first undefined symbol
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: jreiser at BitWagon dot com
  Target Milestone: ---

In --list mode, then dl_main stops processing at the first undefined symbol,
which is unhelpful because it gives no information about the remaining symbols
on the command line.
The glibc source version is
commit 57b3ff8e1a4ca8118c5d9a47584e6e0ce6f7002f (HEAD -> master, origin/master,
origin/HEAD)
Date:   Fri Dec 21 19:02:23 2018 +0000

After fixing
  https://sourceware.org/bugzilla/show_bug.cgi?id=24036
  _dl_debug_vdprintf bad format "0x%0*Zd" from dl_main

then asking about two symbols "abc" and "__libc_start_main" produces output
only for the first symbol "abc":
$ ld-linux-x86-64.so.2 --list /bin/date abc __libc_start_main
        linux-vdso.so.1 (0x00007ffdbb5dc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f295816d000)
        /lib64/ld-linux-x86-64.so.2 => /tmp/ld-linux-x86-64.so.2
(0x00007f2958746000)
/bin/date: symbol lookup error: /bin/date: undefined symbol: abc
$ echo $?
127  ## error exit code for "abc" undefined

which gives no information about the following argument __libc_start_main. 
Reversing the order of the two symbols:
$ ld-linux-x86-64.so.2 --list /bin/date __libc_start_main abc
        linux-vdso.so.1 (0x00007ffde1ae4000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fcb91e0d000)
        /lib64/ld-linux-x86-64.so.2 => /tmp/ld-linux-x86-64.so.2
(0x00007fcb923e6000)
__libc_start_main found at 0x0000000000023030 in object at 0x00007fcb91e0d000
/bin/date: symbol lookup error: /bin/date: undefined symbol: abc

shows correct processing of both symbols.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]