Project

General

Profile

Actions

Feature #14770

closed

ld(1) should be 64bit only

Added by Rich Lowe 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

ld re-execs itself based on the ISA of the running system, as such, all the 32bit version of ld does is exec the 64bit one. We should just ship the 64bit one only.

Actions #1

Updated by Electric Monk 5 months ago

  • Gerrit CR set to 2208
Actions #2

Updated by Rich Lowe 5 months ago

testing:
Ran the illumos elftest test suite with no issues.
Some things to note:
- ld(1) execs the 64bit version regardless of output object type: run an ld before this change, to produce a 32bit object and check DT_SUNW_LDMACH (this is contrary to what you might have expected given -z altexec64).
- The meat of the link-editor is actually in libld.so.4 which is unaffected by this change (a 32bit version must exist for rtld).

So really, this change doesn't actually do much except make us run directly rather than being exec'd by the 32bit ld.
Actions #3

Updated by Electric Monk 5 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 6446bd46ed1b4e9f69da153665f82181ccaedad5

commit  6446bd46ed1b4e9f69da153665f82181ccaedad5
Author: Richard Lowe <richlowe@richlowe.net>
Date:   2022-07-02T22:13:12.000Z

    14770 ld(1) should be 64bit only
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions

Also available in: Atom PDF