This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

.symver GAS directive and local symbols


Jan noticed that if you start out with a local alias of a global
symbol and apply symbol version to that, you get a local symbol:

	.globl foo
	.type foo, @function
	.size foo, 4
foo:
	.long 0
	.set foo.symver.1, foo
	.symver foo.symver.1, foo@VER

Symbol table '.symtab' contains 7 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    2 
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    3 
     4: 0000000000000000     4 FUNC    LOCAL  DEFAULT    1 foo.symver.1
     5: 0000000000000000     4 FUNC    LOCAL  DEFAULT    1 foo@VER
     6: 0000000000000000     4 FUNC    GLOBAL DEFAULT    1 foo

Is there a good reason for this behavior?

What we really want to do is to export the same symbol at multiple
versions, like this:

	.symver foo, foo@VER1
	.symver foo, foo@VER2

But GAS explicitly rejects that.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]