public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: elfutils-devel@sourceware.org
Subject: Re: [RFC PATCH 0/2] elfutils: don't use dlopen() for libebl modules
Date: Wed, 03 Jul 2019 21:46:00 -0000	[thread overview]
Message-ID: <20190703214609.GB5055@vader> (raw)
In-Reply-To: <20190703213953.GC28142@redhat.com>

On Wed, Jul 03, 2019 at 05:39:53PM -0400, Frank Ch. Eigler wrote:
> Hi - 
> 
> > This is actually with dynamically linked binaries -- the size increase
> > is because we link libebl.a directly into all of the binaries in
> > addition to libdw.so:
> > 
> > objdump_LDADD  = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD
> 
> Is there some reason to keep doing that?
> 
> - FChE

Yes:

$ make -C src
make: Entering directory '/home/osandov/dev/elfutils/src'
  CCLD     objdump
/bin/ld: objdump.o: in function `show_relocs_x':
/home/osandov/dev/elfutils/src/objdump.c:352: undefined reference to `ebl_reloc_type_name'
/bin/ld: objdump.o: in function `handle_elf':
/home/osandov/dev/elfutils/src/objdump.c:755: undefined reference to `ebl_openbackend'
/bin/ld: /home/osandov/dev/elfutils/src/objdump.c:757: undefined reference to `ebl_backend_name'
/bin/ld: /home/osandov/dev/elfutils/src/objdump.c:788: undefined reference to `ebl_closebackend'
collect2: error: ld returned 1 exit status
make: *** [Makefile:624: objdump] Error 1
make: Leaving directory '/home/osandov/dev/elfutils/src'

Some of the binaries use libebl, and although libebl is linked into libdw.so,
the libebl symbols are not exported by libdw. So, libebl is linked in
statically for the binaries.

This is why I suggested exporting those symbols from libdw.so. (I also
considered adding a libebl.so, but that would have a circular dependency with
libdw.so, so they might as well be combined).

  reply	other threads:[~2019-07-03 21:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 20:04 Omar Sandoval
2019-07-03 20:04 ` [RFC PATCH 2/2] Don't " Omar Sandoval
2019-07-03 20:04 ` [RFC PATCH 1/2] libcpu: merge libcpu_{i386,x86_64,bpf} into one library Omar Sandoval
2019-07-03 21:33 ` [RFC PATCH 0/2] elfutils: don't use dlopen() for libebl modules Frank Ch. Eigler
2019-07-03 21:37   ` Omar Sandoval
2019-07-03 21:40     ` Frank Ch. Eigler
2019-07-03 21:46       ` Omar Sandoval [this message]
2019-07-04  0:56         ` Frank Ch. Eigler
2019-07-08 20:49           ` Mark Wielaard
2019-07-08 21:02             ` Omar Sandoval
2019-07-09  6:39               ` Florian Weimer
2019-07-09 19:14               ` Mark Wielaard
2019-07-09 19:25                 ` Omar Sandoval
2019-08-26 13:57                   ` Mark Wielaard
2019-07-08 20:33 ` Mark Wielaard

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=20190703214609.GB5055@vader \
    --to=osandov@osandov.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    /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).