[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-01-26 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

Igor Pashev  changed:

   What|Removed |Added

 CC||pashev.igor at gmail dot
   ||com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13406] version script: please allow anonymous tag to be combined with other tags

2012-01-26 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13406

Igor Pashev  changed:

   What|Removed |Added

 CC||pashev.igor at gmail dot
   ||com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13406] version script: please allow anonymous tag to be combined with other tags

2012-01-26 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13406

--- Comment #2 from Igor Pashev  2012-01-26 
12:52:33 UTC ---
(In reply to comment #0)

> This would also solve bug 12548 as a side-effect :)

I' not sure. I got "File format not recognized" when linking library built with
this patch (and mixing anon- and non-anon tags)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13406] version script: please allow anonymous tag to be combined with other tags

2012-02-24 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13406

--- Comment #3 from Igor Pashev  2012-02-25 
07:30:58 UTC ---
What about assigning [on the fly] some tag instead to those "anonymous" tags?

Say "__solaris_anon" or whatsoever. Or maybe "Base". dpkg-gensymbols list
anonymous tags as @Base. In any case if this will be fixed in other way, we can
use LD_NOVERSION for transition.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-02-24 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #3 from Igor Pashev  2012-02-25 
07:34:55 UTC ---
What about assigning [on the fly] some tag instead to those "anonymous" tags?

Say "__solaris_anon" or whatsoever. Or maybe "Base". dpkg-gensymbols list
anonymous tags as @Base. In any case if this will be fixed in other way, we can
use LD_NOVERSION for transition.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13863] New: Allow alternative linker via LD_ALTEXEC environment variable

2012-03-17 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13863

 Bug #: 13863
   Summary: Allow alternative linker via LD_ALTEXEC environment
variable
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: pashev.i...@gmail.com
Classification: Unclassified


Created attachment 6291
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6291
LD_ALTEXEC implementation

Solaris linker (ld [1]) has an ability to run an arbitrary program specified
via LD_ALTEXEC environment variable. I have created a patch to add similar
functionality to GNU ld.

[1] http://www.opensolarisforum.org/man/man1/ld.html#4

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] New: "strip" breaks .SUNW_ldynsym section on illumos

2012-08-18 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

 Bug #: 14493
   Summary: "strip" breaks .SUNW_ldynsym section on illumos
   Product: binutils
   Version: 2.22
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: pashev.i...@gmail.com
Classification: Unclassified


Created attachment 6586
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6586
test_ldynsym-nonstripped-elfdump-s.txt

"strip" damages ELF section ".SUNW_ldynsym" on illumos.

As a result elfdump reports, for example, "libavl.so.1: .SUNW_ldynsym: invalid
sh_link: 0"

And linker cannot link with the resulting library:
"ld: fatal: file libc.so: section [4279087549](null): has invalid sh_info:
-37933168108576"


Here is a minimal example from [1]:
#include 

static void
static_func(void)
{
/* Use dladdr(3C) to print a call stack */
printstack(1);

/*
 * Write to address 0, killing the process and
 * producing a core file.
 */
*((char *) 0) = 1;
}


int main(int argc, char *argv[])
{
static_func();
return (0);
}

# cc -Wl,-znoldynsym test.c -o test_noldynsym
# cc test.c -o test_ldynsym
# elfdump -s test_ldynsym > test_ldynsym-nonstripped-elfdump-s.txt
# stript test_ldynsym
# elfdump -s test_ldynsym &>test_ldynsym-stripped-elfdump-s.txt
# elfdump -s test_noldynsym > test_noldynsym-nonstripped-elfdump-s.txt
# strip test_noldynsym
# elfdump -s test_noldynsym > test_noldynsym-stripped-elfdump-s.txt


Also, before stripping size of test_ldynsym is 10K, after - 72K(!)




[1] https://blogs.oracle.com/ali/entry/what_is_sunw_ldynsym

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-18 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #1 from Igor Pashev  2012-08-18 
10:19:57 UTC ---
Created attachment 6587
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6587
test_ldynsym-stripped-elfdump-s.txt

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-18 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #2 from Igor Pashev  2012-08-18 
10:21:01 UTC ---
Created attachment 6588
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6588
test_noldynsym-nonstripped-elfdump-s.txt

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-18 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #3 from Igor Pashev  2012-08-18 
10:22:09 UTC ---
Created attachment 6589
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6589
test_noldynsym-stripped-elfdump-s.txt

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-23 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #5 from Igor Pashev  2012-08-23 
14:42:07 UTC ---
Created attachment 6607
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6607
C source

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-23 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #7 from Igor Pashev  2012-08-23 
14:46:16 UTC ---
Created attachment 6609
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6609
Dump made by solaris utility elfdump

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-23 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #8 from Igor Pashev  2012-08-23 
14:47:39 UTC ---
Created attachment 6610
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6610
Dump made by readelf from GNU binutils

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-23 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #6 from Igor Pashev  2012-08-23 
14:44:44 UTC ---
Created attachment 6608
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6608
Compiled solaris 32-bit binary (gcc -O0 -gdwarf-2; GCC 3.4.3
(csl-sol210-3_4-20050802))

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-23 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #9 from Igor Pashev  2012-08-23 
14:58:24 UTC ---
AFAIK, ".SUNW_ldynsym" and ".dynsym" sections do overlap.

".SUNW_ldynsym" goes just before ".dynsym" and supersets it.
So Solaris utilities read contents of ".dynsym" as it is under
".SUNW_ldynsym".

libelfg0 from Debian refused to write ELFs with ".SUNW_ldynsym" without
ELF_F_LAYOUT_OVERLAP flag.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-25 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #12 from Igor Pashev  2012-08-25 
15:47:56 UTC ---
Created attachment 6613
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6613
with patch: elfdump of stripped binary (strip ldynsym)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-25 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #13 from Igor Pashev  2012-08-25 
15:49:34 UTC ---
Created attachment 6614
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6614
with patch: elfdump of 'strip-x'ed binary (strip -x ldynsym)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-08-25 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #14 from Igor Pashev  2012-08-25 
15:54:44 UTC ---
(In reply to comment #11)
> Created attachment 6612 [details]
> A patch
> 
> Please test it.

Thank you!

"strip" now seems to work properly (elfdump happy with it), but I found new
issue with "strip -x":

After applying "strip -x" to unstripped binary, elfdump say ".symtab:
index[33]: bad symbol entry: : invalid shndx: 38" (see attachment).

Applying "strip -x" to already stripped binary (with plain "strip") does not
change it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #4 from Igor Pashev  2012-10-10 
12:38:05 UTC ---

Could this be caused by symbol "_lib_version" which is compiled in in every

binary from values-X[].o ? "_lib_version" has version tag associated with it in

libc.



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/12549] --as-needed should ignore weak references

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12549



Igor Pashev  changed:



   What|Removed |Added



   Attachment #5276|0   |1

   is patch||

   Attachment #5276|application/octet-stream|text/plain

  mime type||



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #5 from Igor Pashev  2012-10-10 
13:14:30 UTC ---

(In reply to comment #4)

> Could this be caused by symbol "_lib_version" which is compiled in in every

> binary from values-X[].o ? "_lib_version" has version tag associated with it 
> in

> libc.



Oh, no. It is ld/emultempl/solaris2.em.



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #6 from Igor Pashev  2012-10-10 
13:58:45 UTC ---

(In reply to comment #5)

> (In reply to comment #4)

> > Could this be caused by symbol "_lib_version" which is compiled in in every

> > binary from values-X[].o ? "_lib_version" has version tag associated with 
> > it in

> > libc.

> 

> Oh, no. It is ld/emultempl/solaris2.em.



Some more info:



http://sourceware.org/ml/binutils/2010-02/msg00457.html

http://docs.oracle.com/cd/E19082-01/819-0690/chapter2-88783/index.html



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #7 from Igor Pashev  2012-10-10 
14:58:35 UTC ---

(In reply to comment #6)

> (In reply to comment #5)

> > (In reply to comment #4)

> > > Could this be caused by symbol "_lib_version" which is compiled in in 
> > > every

> > > binary from values-X[].o ? "_lib_version" has version tag associated with 
> > > it in

> > > libc.

> > 

> > Oh, no. It is ld/emultempl/solaris2.em.

> 

> Some more info:

> 

> http://sourceware.org/ml/binutils/2010-02/msg00457.html

> http://docs.oracle.com/cd/E19082-01/819-0690/chapter2-88783/index.html



Here is a nice question:



http://sourceware.org/ml/binutils/2010-02/msg00475.html



"What breaks if you omit these symbols?"



AFAIK Nexanta Core Platform <= 3 was using GNU ld by default,

and, I guess, without those symbols.



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #8 from Igor Pashev  2012-10-10 
19:38:50 UTC ---

BTW, Solaris linker is completely happy with anonymous tags.





# cat lib.c 

int hello(void)

{

return -1;

}





# cat map 

{

global:

hello;

local:

*;

};



# gcc -shared lib.c -o liblib.so -Wl,-M,map





// See attached elfdump



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #9 from Igor Pashev  2012-10-10 
19:40:22 UTC ---

Created attachment 6681

  --> http://sourceware.org/bugzilla/attachment.cgi?id=6681

elfdump liblib.so



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



--- Comment #10 from Igor Pashev  2012-10-10 
19:46:56 UTC ---

Sorry for spaming, I guess anonymous symbols should be tagged with the base

version



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-10-10 Thread pashev.igor at gmail dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=12548



Igor Pashev  changed:



   What|Removed |Added



Version|2.21|2.22



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-11-09 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #11 from Igor Pashev  2012-11-09 
12:09:32 UTC ---
It looks like Solaris linker adds soname as a version tag for unversionned
symbols:

libbrand.so: undefined reference to
`__xmldovaliditycheckingdefaultva...@libxml2.so.2'

__xmlDoValidityCheckingDefaultValue is not defined in "libxml2.sym" from
libxml2 sources.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-11-09 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #12 from Igor Pashev  2012-11-09 
12:18:59 UTC ---
(In reply to comment #11)
> It looks like Solaris linker adds soname as a version tag for unversionned
> symbols:
> 
> libbrand.so: undefined reference to
> `__xmldovaliditycheckingdefaultva...@libxml2.so.2'
> 
> __xmlDoValidityCheckingDefaultValue is not defined in "libxml2.sym" from
> libxml2 sources.

Here:
https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/sgs/libld/common/version.c#L948

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13406] version script: please allow anonymous tag to be combined with other tags

2012-11-09 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13406

--- Comment #4 from Igor Pashev  2012-11-09 
18:56:08 UTC ---
anonymous tag may not be combined with other tags.

Instead, on Solaris platform, any non-tagged symbol must be tagged with "Base
version": soname or file base name (if no soname)

https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/sgs/libld/common/version.c#L948

So if libfoo.so.2 has such a mapfile:

{
global:
foo_hello;
foo_world;
}

it must be read as:

libfoo.so.2 {
global:
foo_hello;
foo_world;
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-11-09 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #13 from Igor Pashev  2012-11-09 
19:08:26 UTC ---
Wow! There is an option --default-symver for ld.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-11-13 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #14 from Igor Pashev  2012-11-13 
21:10:32 UTC ---
I think I've fixed this.

The root of the problem is equivalent to this version script:


= >8 
# "Builtin":
 {
global:
_PROCEDURE_LINKAGE_TABLE_;
_edata;
...
}

# Real mapfile:
{
...
}
= 8< 

So for anonymous version tag we just set base version: (See patch)



Test:


# cat test.c
int foo()
{
return 17;
}

const char *bar()
{
return "bar";
}
# cat map
{
global:
foo;
local:
bar;
};
# gcc -fpic -c test.c -o lib.o -O0
# ld/ld-new -o lib.so lib.o -shared --version-script=map
# objdump -T lib.so 

lib.so: file format elf64-x86-64-sol2

DYNAMIC SYMBOL TABLE:
0294 ld  .text   .text
00200308 gDO .dynamic    _DYNAMIC
 gDO .text   _PROCEDURE_LINKAGE_TABLE_
002003b8 lDO .dynamic    _END_
0294 lDO .text   _START_
002003b8 gD  .dynamic    __bss_start
0294 gDF .text  000b foo
002003b8 gD  .dynamic    _edata
 gDO .dynamic    _GLOBAL_OFFSET_TABLE_
002003b8 gD  .dynamic    _end

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-11-13 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #15 from Igor Pashev  2012-11-13 
21:11:20 UTC ---
Created attachment 6734
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6734
proposed patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/12548] anonymous version scripts no longer working with binutils 2.21

2012-11-13 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12548

--- Comment #16 from Igor Pashev  2012-11-13 
21:23:26 UTC ---
*** Bug 13406 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/13406] version script: please allow anonymous tag to be combined with other tags

2012-11-13 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=13406

Igor Pashev  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #5 from Igor Pashev  2012-11-13 
21:23:26 UTC ---
Bug #12548 has some real fix.

*** This bug has been marked as a duplicate of bug 12548 ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14852] New: gnu ld can't use a library linked via solaris ld, if that library uses a library linked with GNU ld

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14852

 Bug #: 14852
   Summary: gnu ld can't use a library linked via solaris ld, if
that library uses a library linked with GNU ld
   Product: binutils
   Version: 2.22
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: pashev.i...@gmail.com
Classification: Unclassified


Created attachment 6741
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6741
test suite and binaries

Suppose we have a library [number 1] linked with GNU ld, say libz.
Then we use this library (libz) to create other library [number 2]
(e. g. libzfs), but using illumos/solaris link-editor.
Then if we try to link libzfs to some application using
GNU ld we will fail. Error will look like:

"undefined reference to `compr...@libz.so.1'"

This is because symbol `compress' in libz has no version assosiated, and thus
is of "base version" which is the soname. Default and hardcoded behavior of
solaris link-editor is to import base versions into outputfile (I quess it is
like the option --default-imported-symver for GNU ld).

I'd rather think it's solaris linker bug (a kind of), but it looks more tricky,
because solaris linker can use library number 2 without any issues.

I'm attaching an archive with tests and precompiled libraries.

Note, that GNU ld I use is patched to support alternative linker, and
ld-gnu-to-sun is a wrapper for solaris ld.

Build log:

# LANG=C make -k
gcc -shared -fpic -Wl,-h -Wl,libfoo-gnu.so -o libfoo-gnu.so
-Wl,--version-script,foo.map libfoo.c
gcc -shared -fpic -Wl,-h -Wl,libbar-gnu.so -o libbar-gnu.so -L. -lfoo-gnu -R
\$ORIGIN libbar.c
gcc -o app-gnu-libbar-gnu main.c -L. -lbar-gnu -Wl,-rpath,. -R \$ORIGIN
LD_ALTEXEC=ld-gnu-to-sun gcc -shared -fpic -Wl,-h -Wl,libbar-sun.so -o
libbar-sun.so -L. -lfoo-gnu -R \$ORIGIN libbar.c
+ exec /usr/bin/sunld -G -dy -z text -R $ORIGIN -Qy -o libbar-sun.so
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crti.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/values-Xa.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/crtbegin.o -L.
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../../lib -L/lib/x86_64-illumos
-L/lib/../lib -L/usr/lib/x86_64-illumos -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../.. -h libbar-sun.so -lfoo-gnu
/var/tmp//ccgwa4JF.o -lgcc_s -lc -lgcc_s
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/crtend.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crtn.o
ld: warning: global symbol '_END_' has non-global binding:
(file ./libfoo-gnu.so value=LOCL);
ld: warning: global symbol '_START_' has non-global binding:
(file ./libfoo-gnu.so value=LOCL);
gcc -o app-gnu-libbar-sun main.c -L. -lbar-sun -Wl,-rpath,. -R \$ORIGIN
./libbar-sun.so: undefined reference to `f...@libfoo-gnu.so'
collect2: error: ld returned 1 exit status
make: *** [app-gnu-libbar-sun] Error 1
LD_ALTEXEC=ld-gnu-to-sun gcc -o app-sun-libbar-sun main.c -L. -lbar-sun
-Wl,-rpath,. -R \$ORIGIN
+ exec /usr/bin/sunld -R $ORIGIN -Qy -o app-sun-libbar-sun
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crt1.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crti.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/values-Xa.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/crtbegin.o -L.
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../../lib -L/lib/x86_64-illumos
-L/lib/../lib -L/usr/lib/x86_64-illumos -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../.. /var/tmp//ccvHaqLF.o
-lbar-sun -rpath . -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/crtend.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crtn.o
ld: warning: global symbol '_END_' has non-global binding:
(file ./libfoo-gnu.so value=LOCL);
ld: warning: global symbol '_START_' has non-global binding:
(file ./libfoo-gnu.so value=LOCL);
LD_ALTEXEC=ld-gnu-to-sun gcc -o app-sun-libbar-gnu main.c -L. -lbar-gnu
-Wl,-rpath,. -R \$ORIGIN
+ exec /usr/bin/sunld -R $ORIGIN -Qy -o app-sun-libbar-gnu
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crt1.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/crti.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos/values-Xa.o
/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/crtbegin.o -L.
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../x86_64-illumos
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../../../lib -L/lib/x86_64-illumos
-L/lib/../lib -L/usr/lib/x86_64-illumos -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-pc-solaris2.11/4.7/../../.. /var/tmp//ccINaaMF.o
-lbar-gn

[Bug ld/14852] gnu ld can't use a library linked via solaris ld, if that library uses a library linked with GNU ld

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14852

--- Comment #1 from Igor Pashev  2012-11-16 
10:12:18 UTC ---
# cat /usr/bin/ld-gnu-to-sun 
#!/bin/sh

set -e
set -u

cmd=/usr/bin/sunld

while [ $# -ne 0 ]; do
case "$1" in
# GCC with GNU ld passes -m ,
# Sun ld does not need it, and -m options has different meaning:
-m) shift || true;;

# Ignore long options, Sun ld does not support long options at all:
--*) ;;

*) cmd="$cmd $1" ;;
esac
shift || true
done

# Trace:
set -x
exec $cmd

exit 0

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493



--- Comment #19 from Igor Pashev  2012-11-16 
13:37:44 UTC ---

Ok, with the patch for SUNW_ldynsym stripped library now can be linked in

successfully, but now I'm confused with the size of stripped binary:



# ls -lh libfoo*.so

-rwxr-xr-x 1 root root 4,4K ноя 16 17:28 libfoo-gnu-stripped
.so

-rwxr-xr-x 1 root root 6,5K ноя 16 17:26 libfoo-gnu.so

-rwxr-xr-x 1 root root  70K ноя 16 17:28 libfoo-sun-stripped
.so

-rwxr-xr-x 1 root root 7,8K ноя 16 17:27 libfoo-sun.so



libfoo-gnu.so is produced by GNU linker,

libfoo-sun.so - bysolaris linker.



(See the attachment libfoo.tar.bz2)



Both are stripped with GNU strip, without any options.



I've backported your patch to binutils 2.22 [1], did I missed something?



[1]

http://osdyson.org/projects/binutils/repository/entry/patches/pr14493-sol2.
patch



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493



--- Comment #20 from Igor Pashev  2012-11-16 
13:38:40 UTC ---

Ok, with the patch for SUNW_ldynsym stripped library now can be linked in

successfully, but now I'm confused with the size of stripped binary:



# ls -lh libfoo*.so

-rwxr-xr-x 1 root root 4,4K ноя 16 17:28 libfoo-gnu-stripped
.so

-rwxr-xr-x 1 root root 6,5K ноя 16 17:26 libfoo-gnu.so

-rwxr-xr-x 1 root root  70K ноя 16 17:28 libfoo-sun-stripped
.so

-rwxr-xr-x 1 root root 7,8K ноя 16 17:27 libfoo-sun.so



libfoo-gnu.so is produced by GNU linker,

libfoo-sun.so - bysolaris linker.



(See the attachment libfoo.tar.bz2)



Both are stripped with GNU strip, without any options.



I've backported your patch to binutils 2.22 [1], did I miss something?



[1]

http://osdyson.org/projects/binutils/repository/entry/patches/pr14493-sol2.
patch



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #21 from Igor Pashev  2012-11-16 
13:39:56 UTC ---
[1]
http://osdyson.org/projects/binutils/repository/entry/patches/pr14493-sol2.patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #22 from Igor Pashev  2012-11-16 
13:40:27 UTC ---
http://osdyson.org/projects/binutils/repository/entry/patches/pr14493-sol2.patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #23 from Igor Pashev  2012-11-16 
13:41:32 UTC ---
Created attachment 6742
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6742
large size of stripped binary

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-16 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #24 from Igor Pashev  2012-11-16 
13:43:14 UTC ---
Oh, bugzilla is confused with pr14493 in URL

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-17 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493

--- Comment #26 from Igor Pashev  2012-11-17 
08:42:45 UTC ---
(In reply to comment #25)
> (In reply to comment #23)
> > Created attachment 6742 [details]
> > large size of stripped binary
> 
> Please provide unstripped library.

I did, libfoo-sun.so is unstripped, libfoo-sun-stripped.so is stripped.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14493] "strip" breaks .SUNW_ldynsym section on illumos

2012-11-21 Thread pashev.igor at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14493



--- Comment #28 from Igor Pashev  2012-11-21 
09:28:28 UTC ---

Excellent!



# ./binutils/strip-new libfoo-sun.so -o libfoo-sun-stripped.so

e# ls -lh libfoo-sun-stripped.so libfoo-sun.so

-rwxr-xr-x 1 root root 7,1K ноя 16 19:11 libfoo-sun.so

-rwxr-xr-x 1 root root 4,9K ноя 21 09:25 libfoo-sun-stripped
.so



Thank you very much for you work and patience.



-- 

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email

--- You are receiving this mail because: ---

You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils