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.

<main.c>
#define PACKAGE "your-program-name"
#define PACKAGE_VERSION "1.2.3"

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

int main(int argc, char** argv)
{
    bfd_init();

    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");
    else
        printf("not object file\n");

    bfd_close(file);

    return 0;
}
</main.c>
 

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

Regards,
J.


------------------------------------------------------------------------------
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
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
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:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe