Project

General

Profile

Bug #7323

ld(1) -zignore can erroneously discard init and fini arrays as unreferenced

Added by Rich Lowe over 4 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

.init_array and .fini_array are referenced via the entries in .dynamic, and not by the program text otherwise.
ld(1)'s ignore processing needs to know that these sections are special and cannot be discarded in that fashion.

When these sections are ignored, the DT_ entries are still created, with 0 address and size. The linker is smart enough not to call NULL in these cases, but applications dependent on their initialization having occurred will fail.


Related issues

Related to OpenIndiana Distribution - Feature #6965: Provide GCC 5 as additional compilerResolvedOI Userland2016-05-11

Actions
#1

Updated by Electric Monk over 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit a0fb1590788f4dcbcee3fabaeb082ab7d1ad4203

commit  a0fb1590788f4dcbcee3fabaeb082ab7d1ad4203
Author: Richard Lowe <richlowe@richlowe.net>
Date:   2016-08-27T22:38:54.000Z

    7323 ld(1) -zignore can erroneously discard init and fini arrays as unreferenced
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

#2

Updated by Aurélien Larcher over 4 years ago

  • Related to Feature #6965: Provide GCC 5 as additional compiler added

Also available in: Atom PDF