All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Shane Peelar <lookatyouhacker@gmail.com>
Cc: yocto@yoctoproject.org
Subject: Re: prelink-cross with -fno-plt
Date: Thu, 23 May 2019 21:08:48 -0700	[thread overview]
Message-ID: <bb585fca-cdc0-1c2a-47db-cf854b23d850@gmail.com> (raw)
In-Reply-To: <CAEseUXkdwLzK-r92SUMXVoMWFpVNVRNzVpjQGMzNLOJvx=jcbg@mail.gmail.com>



On 5/23/19 7:53 PM, Shane Peelar wrote:
> Any of them on the system pretty much, and yes they are also built with 
> -fno-plt.

OK, I think its better to them conditionally check for .plt section,
can you describe more of whats going on when sections are checked.

> 
> On Thu, May 23, 2019 at 9:59 PM Khem Raj <raj.khem@gmail.com 
> <mailto:raj.khem@gmail.com>> wrote:
> 
> 
> 
>     On 5/23/19 8:05 AM, Shane Peelar wrote:
>      > Hi Everyone @ the Yocto project,
>      >
>      > I'm Shane Peelar, a PhD Candidate at the University of Windsor.
>      > I'm writing to you about prelink-cross, as part of the Yocto project.
>      > Specifically, I'm looking at using it with executables built using
>      > `-fno-plt` under GCC.
>      > I wasn't quite sure where to send this email to, so I figured I'd
>     try
>      > here.  If there's a better place to send this, please let me know.
>      >
>      > Right now, prelink-cross seems to fail an assertion in
>     arch-x86_64.c,
>      > line 421, when
>      > using it with an executable built with `-fno-plt`:
>      >
>      > ...
>      > assert (i < dso->ehdr.e_shnum)
>      > ...
>      >
>      > This snippet seems to be looking for the ".plt" section and,
>     since it
>      > can't find it, the assertion fires.  This makes sense because in
>      > `-fno-plt` executables, the `.plt` section is missing entirely.
>      > I'm not an expert on ELF stuff, although I am learning quickly.  It
>      > looks like
>      > this code wants to write into GOT[1] the address of ".plt" + 0x16 --
>      > since ".plt" doesn't
>      > exist, does it make sense to just change this assert to an if
>     statement
>      > like so:
>      >
>      > ...
>      >        if (i < dso->ehdr.e_shnum)
>      >        { ... }
>      > ...
>      >
>      > and skip over that part?  Or is this a real error condition for
>      > prelink-cross and it really should not continue?  The executable in
>      > question is also non-PIE, if that makes a difference.
>      >
> 
>     what shared libs is this linking to ? are they also built with
>     -fno-plt ?
> 
>      > Thanks for your time,
>      > Shane
>      >
> 


  reply	other threads:[~2019-05-24  4:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 15:05 prelink-cross with -fno-plt Shane Peelar
2019-05-24  1:59 ` Khem Raj
2019-05-24  2:53   ` Shane Peelar
2019-05-24  4:08     ` Khem Raj [this message]
2019-05-24 15:10       ` Shane Peelar
2019-05-24 16:27         ` Khem Raj
2019-05-25  1:58           ` Shane Peelar
2019-05-25  6:30             ` Khem Raj
2019-05-25 12:53               ` Shane Peelar
2019-05-28 18:57                 ` Mark Hatle
2019-05-29 18:42                   ` Shane Peelar
2019-06-01 22:50                     ` Mark Hatle
2019-06-03  4:50                       ` Shane Peelar

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=bb585fca-cdc0-1c2a-47db-cf854b23d850@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=lookatyouhacker@gmail.com \
    --cc=yocto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.