From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10941 invoked by alias); 14 Nov 2005 21:47:08 -0000 Received: (qmail 10882 invoked by uid 48); 14 Nov 2005 21:47:03 -0000 Date: Mon, 14 Nov 2005 21:47:00 -0000 Subject: [Bug c/24863] New: New __attribute__((alias("target"))) requirement break aliasing assembler functions X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "arnold-j at t-online dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-11/txt/msg02095.txt.bz2 List-Id: The new requirement for (weak) symbol aliasing: Given __attribute__((alias("target"))) it is now an error if target is not a symbol, defined in the same translation unit. This also applies to aliases created by #pragma weak alias=target. This is because it's meaningless to define an alias to an undefined symbol. On Solaris, the native assembler would have caught this error, but GNU as does not. breaks compilation of code like this (example from an sh-elf target, but the effect is architecture-independent): extern __attribute__((weak,alias("UIE11"))) void NMI(void); void UIE11 (void); asm( "_UIE11:\tbsr\t_UIE\n\tmov.l\t@r15+,r4\t\n" ); which is perfectly valid and worked in all of gcc 3.0.x, gcc 3.3.x and gcc 3.4.x -- Summary: New __attribute__((alias("target"))) requirement break aliasing assembler functions Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: arnold-j at t-online dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24863