[Bug gas/4572] division doesn't work on solaris/x86

2009-07-31 Thread viskovatoff at imap dot cc

--- Additional Comments From viskovatoff at imap dot cc  2009-07-31 15:39 
---
Created an attachment (id=4102)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4102&action=view)
Make GAS with a Solaris target treat '/' as it does for other *nixes

>From the above comments it's fairly clear that the reason this "bug" exists is
that the Sus x86 Assembly Language Reference Manual states that '/' should be
treated as starting comments. I would like to suggest that requiring GAS to
adhere to that specification for Solaris targets is to misunderstand the role
that GAS plays in the Solaris world. People who run Solaris who use GAS do not
use it to assemble code that was written for the Sun assembler. They use it in
the process of porting code that was written for the GNU assembler, typically
with Linux targets, to Solaris. Making the default behavior of GAS with a
Solaris target to treat '/' as starting a comment makes porting software from
GNU/Linux to Solaris more difficult and cumbersome.

I propose changing the default behavior of GAS with a Solaris target when it
comes to '/' to be the same as it is for Linux and other Unixes such as FreeBSD
and NetBSD. I have attached a patch, called svr4-comment.diff, which changes
the default behavior of GAS for Solaris to conform to that of other *nix
targets, and adds an option, called "svr4-comments", which changes the behavior
back to the present one. This patch is modeled after the code for the
"--divide" option. I've tested the patch under the current development release
of OpenSolaris, snv_118, on an X64 system.

The issue of GAS producing errors for a Solaris target when '/' is used to
indicate division comes up repeatedly in forums and mailing lists. When the
reason for this behavior is finally discovered, it is difficult to get
maintainers of the code in question to accept a Solaris-specific patch to get
around it, apparently because maintainers find that the need for such a patch
is just too bizarre. I've floated this proposal to change the default behavior
on the OpenSolaris.org forums, and the response was that making GAS for Solaris
targets adhere to the archaic Sun convention for comments as opposed to conform
to the rest of the *nix world is wrong. Also, it was felt that modifying any
existing code that is part of Solaris or OpenSolaris which uses '/' to indicate
comments and which is assembled using GAS instead of the Sun assembler (if
there is such code) to use the new proposed option would not be a significant
burden.

I hope the maintainers will look positively on this proposal. Its acceptance
would make life in the Solaris world easier.

-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug gold/10471] New: hidden symbol gets added to dynamic symbol table

2009-07-31 Thread silvius dot rus at gmail dot com
A hidden symbol gets placed in the dynamic symbol table (as local) if referenced
from a shared library.  The right behavior should be to issue an error.

$ cat foo.c
int foo() __attribute((visibility("hidden")));
int foo () { return 42; }
int main() { return foo(); }

$ cat bar.c 
int bar() { return foo(); }

Linking with gnu ld:
ld: a.out: hidden symbol `foo' in /tmp/cc8PyfIO.o is referenced by DSO

Linking with gold before 
http://sourceware.org/ml/binutils/2009-02/msg00367.html:
nm -D a.out  | grep foo
0040035c T foo

Linking with gold after http://sourceware.org/ml/binutils/2009-02/msg00367.html:
nm -D a.out  | grep foo
0040038c t foo

-- 
   Summary: hidden symbol gets added to dynamic symbol table
   Product: binutils
   Version: 2.18
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: ian at airs dot com
ReportedBy: silvius dot rus at gmail dot com
CC: bug-binutils at gnu dot org,ccoutant at google dot
com,ppluzhnikov at google dot com
 GCC build triplet: x86_64-unknown-linux
  GCC host triplet: x86_64-unknown-linux
GCC target triplet: x86_64-unknown-linux


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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


[Bug gas/4572] division doesn't work on solaris/x86

2009-07-31 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2009-08-01 
05:03 ---
I suggest you add a new option to treate '/' as divide on Solaris.

-- 


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

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


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