[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/213] New: Fake labels in .o when file is assembled with --gstab
From: |
danglin at gcc dot gnu dot org |
Subject: |
[Bug gas/213] New: Fake labels in .o when file is assembled with --gstabs |
Date: |
10 Jun 2004 17:46:25 -0000 |
Assembling the following file:
# 1 "lib2funcs.asm"
# 1 "/mnt/gnu/gcc-3.3/objdir/gcc//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "lib2funcs.asm"
; Subroutines for calling unbound dynamic functions from within GDB for HPPA.
; Subroutines for out of line prologues and epilogues on for the HPPA
; Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
; This file is part of GCC.
; GCC is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2, or (at your option)
; any later version.
; GCC is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
; In addition to the permissions in the GNU General Public License, the
; Free Software Foundation gives you unlimited permission to link the
; compiled version of this file into combinations with other programs,
; and to distribute those combinations without any restriction coming
; from the use of this file. (The General Public License restrictions
; do apply in other respects; for example, they cover modification of
; the file, and distribution when not linked into a combine
; executable.)
; You should have received a copy of the GNU General Public License
; along with GCC; see the file COPYING. If not, write to
; the Free Software Foundation, 59 Temple Place - Suite 330,
; Boston, MA 02111-1307, USA.
.SPACE $PRIVATE$
.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
.SPACE $TEXT$
.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
.SUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,SORT=8
.IMPORT $$dyncall,MILLICODE
.SPACE $TEXT$
.SUBSPA $CODE$
; Simply call with the address of the desired import stub in %r22 and
; arguments in the normal place (%r26-%r23 and stack slots).
;
.align 4
.EXPORT __gcc_plt_call,ENTRY,PRIV_LEV=3,RTNVAL=GR
__gcc_plt_call
.PROC
.CALLINFO
.ENTRY
; Our return address comes in %r31, not %r2!
stw %r31,-8(%r30)
; An inline version of dyncall so we don't have to worry
; about long calls to millicode, PIC and other complexities.
bb,>=,n %r22,30,L$foo
depi 0,31,2,%r22
ldw 4(%r22),%r19
ldw 0(%r22),%r22
L$foo
ldsid (%r22),%r1
mtsp %r1,%sr0
ble 0(%sr0,%r22)
copy %r31,%r2
ldw -8(%r30),%r2
; We're going to be returning to a stack address, so we
; need to do an intra-space return.
ldsid (%rp),%r1
mtsp %r1,%sr0
be,n 0(%sr0,%rp)
.EXIT
.PROCEND
with
/opt/gnu/bin/as --gstabs -o xxx.o xxx.s
results in
# objdump -d xxx.o
xxx.o: file format som
Disassembly of section $CODE$:
00000000 <__gcc_plt_call>:
0: 0f df 12 91 stw r31,-8(,sp)
00000004 <L0L1>:
4: c7 d6 c0 12 bb,>=,n r22,1e,14 <L0L5>
00000008 <L0L2>:
8: d6 c0 1c 1e depwi 0,31,2,r22
0000000c <L0L3>:
c: 0e c8 10 93 ldw 4(,r22),r19
00000010 <L0L4>:
10: 0e c0 10 96 ldw 0(,r22),r22
00000014 <L0L5>:
14: 02 c0 10 a1 ldsid (,r22),r1
00000018 <L0L6>:
18: 00 01 18 20 mtsp r1,sr0
0000001c <L0L7>:
1c: e6 c0 00 00 be,l 0(sr0,r22),%sr0,%r31
00000020 <L0L8>:
20: 08 1f 02 42 copy r31,rp
00000024 <L0L9>:
24: 0f d1 10 82 ldw -8(,sp),rp
00000028 <L0L10>:
28: 00 40 10 a1 ldsid (,rp),r1
0000002c <L0L11>:
2c: 00 01 18 20 mtsp r1,sr0
00000030 <L0L12>:
30: e0 40 00 02 be,n 0(sr0,rp)
34: 00 00 00 00 break 0,0
The symbols actually look like this
Symbols from xxx.o:
Value Info Type Scope ck HQIRCDSKLN xl reloc Name
00000014 00000000 Data Local 0 .......... 3 00000 L0^AL5
00000024 00000000 Data Local 0 .......... 3 00000 L0^AL9
00000020 00000000 Data Local 0 .......... 3 00000 L0^AL8
0000001c 00000000 Data Local 0 .......... 3 00000 L0^AL7
00000018 00000000 Data Local 0 .......... 3 00000 L0^AL6
0000002c 00000000 Data Local 0 .......... 3 00000 L0^AL11
00000010 00000000 Data Local 0 .......... 3 00000 L0^AL4
0000000c 00000000 Data Local 0 .......... 3 00000 L0^AL3
00000008 00000000 Data Local 0 .......... 3 00000 L0^AL2
00000004 00000000 Data Local 0 .......... 3 00000 L0^AL1
00000000 00000000 Data Local 0 .......... 3 00000 L0^AL0
00000000 00000000 Data Local 0 .......... 3 00000 L0^AF1
00000030 00000000 Data Local 0 .......... 3 00000 L0^AL12
00000028 00000000 Data Local 0 .......... 3 00000 L0^AL10
00000000 00000000 Data Local 0 .......... 3 00000 L0^AF0
00000003 00000000 Entry Univ 0 .......... 3 00001 __gcc_plt_call
00000000 00000000 Data Local 0 .......... 3 00000 $CODE$
These appear to be fake labels that don't get removed. The
test file doesn't contain any stabs directives.
This is the assembler version:
# /opt/gnu/bin/as --version
GNU assembler 2.15.91 20040520
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `hppa2.0w-hp-hpux11.11'.
--
Summary: Fake labels in .o when file is assembled with --gstabs
Product: binutils
Version: 2.15
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: danglin at gcc dot gnu dot org
CC: bug-binutils at gnu dot org
GCC build triplet: hppa2.0w-hp-hpux11.11
GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11
http://sources.redhat.com/bugzilla/show_bug.cgi?id=213
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug gas/213] New: Fake labels in .o when file is assembled with --gstabs,
danglin at gcc dot gnu dot org <=