Web lists-archives.com

Re: [Mingw-users] libaddr2line.a: dependencies of libbfd.a?

On Oct 04, 2016 at 08:24 AM, Eli Zaretskii wrote:
> > From: Keith Marshall <keithmarshall@xxxxxxxxxxxxxxxxxxxxx>
> > Date: Mon, 3 Oct 2016 23:15:42 +0100
> >
> > > Thanks - agree. However, this package comes along with the implied
> > > dependency to libintl-8.dll which, in general, I wanted to avoid.
> >
> > You'll need to provide a SSCCE, to help me understand where that
> > dependency arises; I'm not seeing it in my build trees, for either the
> > distributed libbfd.a or libiberty.a, (when inspected using "objdump -x
> > ... | grep -i dll" -- not that I'd really expect it to show up, within
> > a static library, until the linker finds a symbol dependency which
> > needs the DLL in question).

Sure. Compile main.c below with

	mingw32-gcc main.c -o t.exe -lbfd -liberty -lintl -lz

to see that t.exe is dependent on libintl-8.dll.

#define PACKAGE "your-program-name"
#define PACKAGE_VERSION "1.2.3"

#include <stdio.h>
#include <bfd.h>

int main(int argc, char** argv)

    char* fn=argv[0];
    printf("exe: '%s'\n", fn);

    bfd* file = bfd_openr(fn, 0);

    if (!file)
        return 1;

    if (bfd_check_format(file, bfd_object))
        printf("object file\n");
        printf("not object file\n");


    return 0;

> If you run "nm -A" on libbfd.a, don't you see the likes of
_libintl_dgettext and
> _libintl_snprintf, all of them "undefined"
> (i.e. with the "U" marker)?  If you don't, perhaps your libbfd comes from
> different package than Jannick's (and mine).

Thanks, Eli. I do see them as well. The date stamp of libbfd.a here is Sep
9, 2015, if this is of any help. 


Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
MinGW-users mailing list

This list observes the Etiquette found at 
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

You may change your MinGW Account Options or unsubscribe at:
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe