Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Robert Varga <robert.varga@getinge.com>, yocto@lists.yoctoproject.org
Subject: Re: [yocto] Linker error undefined reference to `_rtld_global_ro'
Date: Mon, 13 Jul 2020 09:51:26 -0700	[thread overview]
Message-ID: <e123353d-7215-94eb-176e-049ab759defc@gmail.com> (raw)
In-Reply-To: <EDk7.1594639269271279456.HLoQ@lists.yoctoproject.org>



On 7/13/20 4:21 AM, Robert Varga wrote:
> Hello,
> 
> I am new to the Yocto project and need some help in solving a linker 
> issue when compiling/linking an application using the SDK. It seems, 
> that the compilation is completed, but the linker could not resolve to 
> "_rtld_global_ro". Here is the output of the last stage
> <snip>
> ...
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld: 
> /opt/mydistro/1.0.0/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/libc.a(getcontext.o): 
> in function `getcontext':
> /usr/src/debug/glibc/2.29-r0/git/stdlib/../sysdeps/unix/sysv/linux/arm/getcontext.S:101: 
> undefined reference to `_rtld_global_ro'
> /opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld: 
> /opt/mydistro/1.0.0/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/libc.a(setcontext.o): 
> in function `__startcontext':
> /usr/src/debug/glibc/2.29-r0/git/stdlib/../sysdeps/unix/sysv/linux/arm/setcontext.S:100: 
> undefined reference to `_rtld_global_ro'
> collect2: error: ld returned 1 exit status
> makefile:116: recipe for target 'ortable' failed
> make: *** [ortable] Error 1
> </snip>
> 
> What I can see from the output is, that both getcontext.S and 
> setcontext.S are referencing to "_rtld_global_ro". What I do not 
> understand is, why the glibc is located in the debug folder? Is this 
> probably the issue?
> 

it seems static apps with glibc compiled with PIE related. Can you 
verfiy if you get same issue with aarch64 or mips ?

> I have sourced the SDK using following command:
> source 
> /opt/mydistro/1.0.0/environment-setup-cortexa9t2hf-neon-poky-linux-gnueabi
> 
> Here's image bb file (which I have used for building the SDK using this 
> command (bitbake my-image -c populate_sdk).
> 
> require recipes-extended/images/core-image-full-cmdline.bb
> IMAGE_INSTALL_append = " \
>      emmy-w1-driver-sdiosdio \
>      emmy-w1-systemd \
>      eth-systemd \
>      can-systemd \
>      can-utils \
>      lighttpd \
>      dnsmasq \
>      parted \
>      swupdate \
>      swupdate-www \
>      u-boot-fw-utils \
>      linux-firmware-imx-sdma-imx6q \
>      "
> TOOLCHAIN_HOST_TASK_append = " nativesdk-perl-modules"
> SDKIMAGE_FEATURES_append = " staticdev-pkgs"
> Any help on resolving this issue would be greatly appreciated.
> 
> Thanks.
> -- 
> 
> Rob
> 
> 
> 

  reply	other threads:[~2020-07-13 16:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 11:21 Linker error undefined reference to `_rtld_global_ro' Robert Varga
2020-07-13 16:51 ` Khem Raj [this message]
2020-07-14  7:53   ` Robert Varga
2020-07-14 15:45     ` [yocto] " Khem Raj
2020-07-15 14:36       ` Robert Varga
2020-07-16 19:59         ` [yocto] " Khem Raj
2020-07-17  7:51           ` Robert Varga
2020-07-21 15:07             ` Robert Varga
2020-07-21 19:10               ` [yocto] " Khem Raj
2020-07-23 12:42                 ` Robert Varga

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=e123353d-7215-94eb-176e-049ab759defc@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=robert.varga@getinge.com \
    --cc=yocto@lists.yoctoproject.org \
    /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