[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/755] New: objdump creating mis-aligned listing using lates
From: |
schlie at comcast dot net |
Subject: |
[Bug binutils/755] New: objdump creating mis-aligned listing using latest CVS MAIN/HEAD |
Date: |
22 Feb 2005 00:05:55 -0000 |
Given a C source program compiled with gcc4.0 built for target=avr, using -0s
-g,
then generating main.lss using [avr-objdump -h -S main.o], results in a partial
struct
declaration text being displayed between: "00000000 <main>:" and "int main
(void){"
as follows:
File: main.c:
typedef struct {
int a;
int b;
int c;
int d;
int f;
int g;
} s;
int main (void){
volatile s x = {0, 1, 2, 3, 4, 5};
return x.a + x.b + x.c;
}
Then using: [avr-objdump -h -S main.o] produces:
main.o: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000032 00000000 00000000 00000034 2**0
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .data 0000000c 00000000 00000000 00000066 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000000 00000000 00000000 00000072 2**0
ALLOC
3 .stab 0000018c 00000000 00000000 00000074 2**2
CONTENTS, RELOC, READONLY, DEBUGGING
4 .stabstr 00000336 00000000 00000000 00000200 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
<< Missing struct declaration text
here?
00000000 <main>:
int f; << Misplaced partial struct
declaration text here
int g; << And here?
} s; << And here?
int main (void){
0: c0 e0 ldi r28, 0x00 ; 0
2: d0 e0 ldi r29, 0x00 ; 0
4: de bf out 0x3e, r29 ; 62
6: cd bf out 0x3d, r28 ; 61
volatile s x = {0, 1, 2, 3, 4, 5};
8: de 01 movw r26, r28
a: 11 96 adiw r26, 0x01 ; 1
c: e0 e0 ldi r30, 0x00 ; 0
e: f0 e0 ldi r31, 0x00 ; 0
10: 8c e0 ldi r24, 0x0C ; 12
12: 01 90 ld r0, Z+
14: 0d 92 st X+, r0
16: 81 50 subi r24, 0x01 ; 1
18: e1 f7 brne .-8 ; 0x12 <main+0x12>
return x.a + x.b + x.c;
1a: 89 81 ldd r24, Y+1 ; 0x01
1c: 9a 81 ldd r25, Y+2 ; 0x02
1e: 2b 81 ldd r18, Y+3 ; 0x03
20: 3c 81 ldd r19, Y+4 ; 0x04
22: 4d 81 ldd r20, Y+5 ; 0x05
24: 5e 81 ldd r21, Y+6 ; 0x06
26: 82 0f add r24, r18
28: 93 1f adc r25, r19
}
2a: 84 0f add r24, r20
2c: 95 1f adc r25, r21
2e: 0c 94 00 00 jmp 0x0 <main>
--
Summary: objdump creating mis-aligned listing using latest CVS
MAIN/HEAD
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: schlie at comcast dot net
CC: bug-binutils at gnu dot org
GCC build triplet: ppc-apple-darwin7.8
GCC host triplet: ppc-apple-darwin7.8
GCC target triplet: avr-unknown-unknown
http://sources.redhat.com/bugzilla/show_bug.cgi?id=755
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/755] New: objdump creating mis-aligned listing using latest CVS MAIN/HEAD,
schlie at comcast dot net <=
- [Bug binutils/755] objdump creating mis-aligned listing using latest CVS MAIN/HEAD, schlie at comcast dot net, 2005/02/21
- [Bug binutils/755] objdump creating mis-aligned listing using latest CVS MAIN/HEAD, schlie at comcast dot net, 2005/02/21
- [Bug binutils/755] objdump creating mis-aligned listing using latest CVS MAIN/HEAD, schlie at comcast dot net, 2005/02/21
- [Bug binutils/755] objdump creating mis-aligned listing using latest CVS MAIN/HEAD, schlie at comcast dot net, 2005/02/21
- [Bug binutils/755] objdump creating mis-aligned listing using latest CVS MAIN/HEAD, schlie at comcast dot net, 2005/02/21
- [Bug binutils/755] objdump creating mis-aligned listing using latest CVS MAIN/HEAD, schlie at comcast dot net, 2005/02/21