public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RFC: Add STB_GNU_SECONDARY
@ 2012-04-20 19:47 H.J. Lu
  2012-04-20 19:51 ` Roland McGrath
  2012-04-20 20:56 ` Joern Rennecke
  0 siblings, 2 replies; 23+ messages in thread
From: H.J. Lu @ 2012-04-20 19:47 UTC (permalink / raw)
  To: Ansari, Zia; +Cc: GCC Development, GNU C Library, Binutils

Hi,

We have a need to define a secondary symbol as backup in
case there isn't a primary one.  Here is a proposal for
STB_GNU_SECONDARY.  Any comments?

Thanks.

-- 
H.J.
---

STB_GNU_SECONDARY

      Secondary symbols are similar to weak symbols, but their definitions
      have even lower precedence.  Secondary symbols can only appear in a
      relocatable object.  They must be either removed or converted to
      global or local symbols once it has become part of an executable or
      shared object.  The difference between secondary symbols and weak
      symbols are

	1.  When the link editor searches an archive library, it must
	extracts archive members that contain the global, weak or common
	definition of the secondary symbol with the same name and ignore
	the secondary one.
	2.  When the link editor searches a shared object, it must honor
	the global or weak definition in the shared object and ignore the
	secondary one with the same name.
	3. The link editor ignores the secondary definition if there is
	a global, weak or common definition with the same name.

      The purpose of this symbol binding is to provide the primary
      definition as a global, weak or common symbol in an archive library
      or a shared object while keeping a secondary definition in a
      relocatable object.  If there is no primary definition, the
      secondary definition will be used.

STB_GNU_SECONDARY is defined in OS-specific range:

#define STB_LOOS		10	/* OS-specific semantics */
#define STB_GNU_UNIQUE		10	/* Symbol is unique in namespace */
#define STB_GNU_SECONDARY	11	/* Secondary symbol */
#define STB_LOOS		12	/* OS-specific semantics */

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-04-23 18:12 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20 19:47 RFC: Add STB_GNU_SECONDARY H.J. Lu
2012-04-20 19:51 ` Roland McGrath
2012-04-20 20:11   ` H.J. Lu
2012-04-20 20:27     ` Roland McGrath
2012-04-20 20:36       ` H.J. Lu
2012-04-20 22:55     ` Petr Baudis
2012-04-20 23:30       ` H.J. Lu
2012-04-20 20:56 ` Joern Rennecke
2012-04-20 21:20   ` H.J. Lu
2012-04-20 22:11     ` Cary Coutant
2012-04-20 22:48       ` H.J. Lu
2012-04-20 22:49         ` H.J. Lu
2012-04-20 22:59         ` Ian Lance Taylor
2012-04-20 23:36           ` H.J. Lu
2012-04-20 23:40             ` Ian Lance Taylor
2012-04-20 23:51               ` H.J. Lu
2012-04-21  0:49                 ` Ian Lance Taylor
2012-04-21  1:04                   ` H.J. Lu
2012-04-21  1:07                     ` Ian Lance Taylor
2012-04-21  1:09     ` Joern Rennecke
2012-04-21 13:53       ` H.J. Lu
2012-04-21 19:01         ` Joern Rennecke
2012-04-23 18:12           ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).