[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/11002] New: ld string merge does not respect symbol size
From: |
nunoplopes at sapo dot pt |
Subject: |
[Bug binutils/11002] New: ld string merge does not respect symbol size |
Date: |
23 Nov 2009 11:12:56 -0000 |
$ cat a.s
.file "a.c"
.type a,@object
.section .rodata.str1.1,"aMS",@progbits,1
.globl a
a:
.size a, 5 # note that size is 5!
.align 8
.byte 0x61
.byte 0x62
.zero 1
.type b,@object
.globl b
b:
.size b, 2
.byte 0x62
.zero 1
.section .note.GNU-stack,"",@progbits
$ as -o a.o a.s
$ ld -shared -o a.so a.o
$ readelf -a a.o
(...)
7: 00000000 5 OBJECT GLOBAL DEFAULT 4 a
8: 00000003 2 OBJECT GLOBAL DEFAULT 4 b
(note that 'a' has size 5)
$ objdump -s a.so
Contents of section .rodata:
0160 61620000 00000000 ab......
As you can see, the value for the symbol 'a' is broken. It should be 'ab\0b\0'.
--
Summary: ld string merge does not respect symbol size
Product: binutils
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: nunoplopes at sapo dot pt
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11002
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/11002] New: ld string merge does not respect symbol size,
nunoplopes at sapo dot pt <=