public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bas@equator.com To: gcc-gnats@gcc.gnu.org Subject: other/9682: unclear assembler/linker behaviour Date: Thu, 13 Feb 2003 00:16:00 -0000 [thread overview] Message-ID: <20030213001441.21811.qmail@sources.redhat.com> (raw) >Number: 9682 >Category: other >Synopsis: unclear assembler/linker behaviour >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Feb 13 00:16:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: bas aarts >Release: unknown-1.0 >Organization: >Environment: bas@marilyn:~/public > gcc --version gcc (GCC) 3.2.1 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. bas@marilyn:~/public > uname -a Linux marilyn.cam.equator.com 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown >Description: bas@marilyn:~/public > cat attr1.c int a; extern int h __attribute__ ((alias ("a"))); bas@marilyn:~/public > cat attr2.c extern int h; int main(void){return h;} bas@marilyn:~/public > gcc -save-temps attr1.c attr2.c attr2.o: In function `main': attr2.o(.text+0x11): undefined reference to `h' collect2: ld returned 1 exit status I don't know why I have a missing symbol here 2 cases: 1) when in attr1.c, initializing a (so that its not a common anymore), it links fine 2) when in attr1.s, the .set h,a .comm a,4,4 are interchanged into .comm a,4,4 .set h,a bas@marilyn:~/public > gcc -save-temps attr1.s attr2.c -nostdlib /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074 bas@marilyn:~/public > nm a.out 0804908c A __bss_start 0804908c A _edata 08049094 A _end 08049090 B a 0804908c B h 08048074 T main now a and h are two distinct symbols! What is the semantics of the .set directive? >How-To-Repeat: see above >Fix: >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2003-02-13 0:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030213001441.21811.qmail@sources.redhat.com \ --to=bas@equator.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).