From: Nekun <nekokun@firemail.cc>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] TEXTRELs in assembly program
Date: Thu, 22 Apr 2021 21:07:33 +0000 [thread overview]
Message-ID: <acbad7798ab91e1260dc2ae3ce6fda60@firemail.cc> (raw)
Hi all,
Working on the fasm ebuild, have some questions:
1. fasm is written on itself and has two variants: self-contained binary
for x86 and amd64 and linked with libc only for x86. Also, there are
tools for working with the proprietary symbolic information format which
is libc-linked and only x86. So, I provide two USEs, fail in pkg_setup
if we on amd64 host and hasn't multilib profile if they are set and link
it with default CC with -m32. Not sure it's a 'clean' way, would be
happy to get some clarification about handling such cases.
2. When running my ebuild, got two warnings: one about text relocations,
other about executable stack. Second problem seems trivial, just apply
patches which adds corresponding ELF sections. But the first one is not
clear: I found that TEXTRELs occurs due to default '--pie' option passed
to ld by gcc and seems like it isn't possible to remove default ld
options (only add to), so I can construct ld commandline for linking
with libc manually and resolve a bunch of corner cases... But is
avoiding TEXTRELs in assembly programs really necessary? Performance
issues in case of assembly-written assembler seems negligible... What's
best according to ::gentoo policies?
See ebuild draft in attachment.
next reply other threads:[~2021-04-22 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 21:07 Nekun [this message]
2021-04-22 21:23 ` [gentoo-dev] TEXTRELs in assembly program Sam James
2021-04-22 22:29 ` Nekun
2021-04-22 21:32 ` Nekun
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=acbad7798ab91e1260dc2ae3ce6fda60@firemail.cc \
--to=nekokun@firemail.cc \
--cc=gentoo-dev@lists.gentoo.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