Skip to content
Snippets Groups Projects

Define DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE

Open H.J. Lu requested to merge hjl/unique into hjl/master
1 unresolved thread

Add

#define DT_GNU_FLAGS_1 0x6ffffdf4

and

#define DF_GNU_1_UNIQUE 0x00000001

to marke a shared object which should be loaded only once across the entire address space. It is advisory and can be overridden or suppressed.

The pdf file can be downloaded from abi.pdf.

Edited by H.J. Lu

Merge request reports

Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
86 \Hrule
87 \caption{\texttt{DT_GNU_FLAGS_1} Flag Values}
88 \label{dt_gnu_1_unique}
89 \begin{center}
90 \begin{tabular}[t]{l|l}
91 \multicolumn{1}{c}{Name} & \multicolumn{1}{c}{Value} \\
92 \hline
93 \texttt{DF_GNU_1_UNIQUE} & \texttt{0x00000001} \\
94 \end{tabular}
95 \end{center}
96 \Hrule
97 \end{table}
98
99 \begin{description}
100 \item[DF_GNU_1_UNIQUE]
101 If this flag is set in a shared object, only one instance of this
  • H.J. Lu added 2 commits

    added 2 commits

    • a6e63fe0 - Add dl.tex to dependencies of top-level output document
    • 347cd996 - Describe DF_GNU_1_UNIQUE in more detail

    Compare with previous version

  • H.J. Lu added 1 commit

    added 1 commit

    • 16daf75d - Define DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE

    Compare with previous version

  • H.J. Lu added 1 commit

    added 1 commit

    • c5980766 - Define DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE

    Compare with previous version

  • H.J. Lu changed the description

    changed the description

  • I don't know how glibc specific LD_AUDIT is. I was asked not to refer to glibc and glibc internals specifically in the docs which leaves me in a bit of a bind: I'm adding this flag because it's necessary to finish a glibc feature, but I have to update the gABI docs in a way which doesn't mention glibc.

    Edited by Vivek Das Mohapatra
  • How about something like this:

    By default dynamic shared objects are loaded into a single flat namespace. Some <runtimes? frameworks?> permit them to be loaded into alternate namespaces which are separate from the default one. Normally such alternate namespaces are separate from one another (and from the main namespace) - eg they do not see one another's symbols when doing relocations.

    This flag indicates that the DSO which has it should only exist once across all namespaces - if a secondary namespace DSO requires it or tries to load it it will instead be placed in the main namespace and made available to the DSOs in the secondary namespace across the namespace boundary.

  • I think neither LD_AUDIT nor dlmopen are glibc-specific at all, both come from Solaris. So I think it would be fine to name them as examples. dlmopen as one where you would expect sharing with DF_GNU_1_UNIQUE, LD_AUDIT where you would not.

  • Oh, and shouldn't this go into the generic GNU ABI, not the Linux ABI?

    Then we can talk about glibc specifics, too.

  • Be happy to. This is where I was asked to send my changes, so this is where I did.

  • Should I send a merge request to the x86-64-ABI and i386-ABI repos in this group, or is there another location?

  • Been away for a few days. Was there a resolution to the where-should-this-be-documented question?

  • Please register or sign in to reply
    Loading