https://sourceware.org/bugzilla/show_bug.cgi?id=33515
Bug ID: 33515
Summary: String literals are disassembled as code, no as data
Product: binutils
Version: 2.45
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: gjl at gcc dot gnu.org
Target Milestone: ---
Host: x86_64
Target: x86_64,avr
Created attachment 16401
--> https://sourceware.org/bugzilla/attachment.cgi?id=16401&action=edit
simple.c: A C test case
A string literal like
.LC0:
.string "123"
should be disassembled like data, not like code. Test case:
$gcc simple.c -o a.x -nostdlib -nostartfiles -save-temps && objdump -d -j.
rodata a.x
prints:
a.x: file format elf64-x86-64
Disassembly of section .rodata:
0000000000402000 <str-0x8>:
402000: 31 32 xor %esi,(%rdx)
402002: 33 00 xor (%rax),%eax
402004: 00 00 add %al,(%rax)
...
0000000000402008 <str>:
402008: 31 2c 20 32 2c 20 33 00 1, 2, 3.
While str[] is nicely disassembled as a string, .LC0 isn't. Adding .type
.LC0,"object" to the assembly doesn't help.
--
You are receiving this mail because:
You are on the CC list for the bug.