Your solution worked great!  Thank you for that as I don't think I would
have tracked that down soon.

I now have a follow on problem that I have not been able to solve yet -
mostly because my knowledge of the GNU toolchain is not very deep.

This problem only shows up in my Dunfell MIPS build - I also maintain
x86_64, AARCH64, and ARM platforms.

I use the SDK to build some proprietary apps.

I have a library libcommon.so that contains many functions used by the
proprietary apps.

I have an app that uses only a few of the functions in libcomon.so and none
of those functions have any further dependencies.

When I try to link the app using the Dunfell MIPS SDK, it looks like the
linker is including every function in libcommon.so into my app.  Many of
the unused functions have further dependencies on other libraries which I
do not link in because this app isn't using any of those functions.

I've tried everything I can think of to fix this link failure, but no luck.

I assume I'm missing some linker flag now required in Dunfell, but I don't
know which one.

Any thoughts on how to fix my linker failure?

Thanks, Mike


On Thu, Aug 20, 2020 at 8:04 PM Khem Raj <raj.k...@gmail.com> wrote:

> On Wed, Aug 19, 2020 at 3:08 AM MikeB <mabnh...@gmail.com> wrote:
> >
> > Reposting in the hopes of getting an answer - I'm stuck.
> >
> > I'm in the process of upgrading from Zeus to Dunfell.  For my MIPS
> platform, the library ABI version has changed from 0 to 5.  I have some
> backward compatibility issues that require generating at least some
> libraries with ABI version 0.  I've tried using -fabi_version=0 in my
> CCFLAGS, but that seems to be ignored.  Can someone tell me how to set the
> ABI version back to 0 in my image and SDK?
> >
> > I'm building for a custom MIPs platform running on a Cavium Octeon II in
> 32-bit mode.
> >
> > TUNE_FEATURES  = "o32 bigendian fpu-hard octeon2"
> >
> > A current Dunfell shared library ELF Header looks like this:
> >
> > ELF Header:
> >   Magic:   7f 45 4c 46 01 02 01 00 05 00 00 00 00 00 00 00
> >   Class:                             ELF32
> >   Data:                              2's complement, big endian
> >   Version:                           1 (current)
> >   OS/ABI:                            UNIX - System V
> >   ABI Version:                       5
> >   Type:                              DYN (Shared object file)
> >   Machine:                           MIPS R3000
> >   Version:                           0x1
> >   Entry point address:               0x1630
> >   Start of program headers:          52 (bytes into file)
> >   Start of section headers:          22488 (bytes into file)
> >   Flags:                             0x808d1107, noreorder, pic, cpic,
> 32bitmode, octeon2, o32, mips64r2
> >
> > The same library built with Zeus looks like this.
> >
> > ELF Header:
> >   Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
> >   Class:                             ELF32
> >   Data:                              2's complement, big endian
> >   Version:                           1 (current)
> >   OS/ABI:                            UNIX - System V
> >   ABI Version:                       0
> >   Type:                              DYN (Shared object file)
> >   Machine:                           MIPS R3000
> >   Version:                           0x1
> >   Entry point address:               0x1500
> >   Start of program headers:          52 (bytes into file)
> >   Start of section headers:          22340 (bytes into file)
> >   Flags:                             0x808d1107, noreorder, pic, cpic,
> 32bitmode, octeon2, o32, mips64r2
> >
> > The ABI Version being the issue.
> >
>
> This is due to switching default hash style from sysv to gnu starting
> dunfell. You can switch back to sysv either via LDFLAGS
> or explicitly define
>
> LINKER_HASH_STYLE_mipsarch = "sysv"
>
> in your distro.
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#50337): https://lists.yoctoproject.org/g/yocto/message/50337
Mute This Topic: https://lists.yoctoproject.org/mt/76283333/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to