https://sourceware.org/bugzilla/show_bug.cgi?id=23658
H.J. Lu changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED |---
--- Comment #6 from H.J. Lu ---
It isn't right for -shared:
/export/build/gnu/binutils/build-x86_64-linux/ld/../gas/as-new --defsym
ALIGN=3 -mx86-used-note=no -o tmpdir/pr23658-1a.o
/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf/pr23658-1a.s
/export/build/gnu/binutils/build-x86_64-linux/ld/../gas/as-new --defsym
ALIGN=3 -mx86-used-note=no -o tmpdir/pr23658-1b.o
/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf/pr23658-1b.s
/export/build/gnu/binutils/build-x86_64-linux/ld/../gas/as-new --defsym
ALIGN=3 -mx86-used-note=no -o tmpdir/pr23658-1c.o
/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf/pr23658-1c.s
/export/build/gnu/binutils/build-x86_64-linux/ld/../gas/as-new --defsym
ALIGN=3 -mx86-used-note=no -o tmpdir/pr23658-1d.o
/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf/pr23658-1d.s
/export/build/gnu/binutils/build-x86_64-linux/ld/../gas/as-new --defsym
ALIGN=3 -mx86-used-note=no -o tmpdir/start.o
/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf/start.s
./ld-new -z norelro
-L/export/gnu/import/git/sources/binutils-gdb/ld/testsuite/ld-elf --build-id
-shared -o tmpdir/dump tmpdir/pr23658-1a.o tmpdir/pr23658-1b.o
tmpdir/pr23658-1c.o tmpdir/pr23658-1d.o tmpdir/start.o
/export/build/gnu/binutils/build-x86_64-linux/ld/../binutils/readelf -S -l
--wide tmpdir/dump
There are 16 section headers, starting at offset 0x2550:
Section Headers:
[Nr] Name TypeAddress OffSize ES Flg
Lk Inf Al
[ 0] NULL 00 00 00
0 0 0
[ 1] .note.4 NOTE2000 002000 28 00 A
0 0 8
[ 2] .note.1 NOTE2028 002028 28 00 A
0 0 8
[ 3] .note.gnu.build-id NOTE0200 000200 24 00 A
0 0 4
[ 4] .note.2 NOTE2050 002050 28 00 A
0 0 4
[ 5] .note.3 NOTE2078 002078 28 00 A
0 0 4
[ 6] .hash HASH0228 000228 30 04 A
8 0 8
[ 7] .gnu.hash GNU_HASH0258 000258 3c 00 A
8 0 8
[ 8] .dynsym DYNSYM 0298 000298 a8 18 A
9 1 8
[ 9] .dynstr STRTAB 0340 000340 13 00 A
0 0 1
[10] .text PROGBITS1000 001000 10 00 AX
0 0 1
[11] .eh_frame PROGBITS20a0 0020a0 00 00 A
0 0 8
[12] .dynamic DYNAMIC 30a0 0020a0 c0 10 WA
9 0 8
[13] .symtab SYMTAB 002160 0002e8 18
14 25 8
[14] .strtab STRTAB 002448 81 00
0 0 1
[15] .shstrtab STRTAB 0024c9 81 00
0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
l (large), p (processor specific)
Elf file type is DYN (Shared object file)
Entry point 0x1008
There are 8 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz
Flg Align
LOAD 0x00 0x 0x 0x000353
0x000353 R 0x1000
LOAD 0x001000 0x1000 0x1000 0x10
0x10 R E 0x1000
LOAD 0x002000 0x2000 0x2000 0xa0
0xa0 R 0x1000
LOAD 0x0020a0 0x30a0 0x30a0 0xc0
0xc0 RW 0x1000
DYNAMIC0x0020a0 0x30a0 0x30a0 0xc0
0xc0 RW 0x8
NOTE 0x002000 0x2000 0x2000 0x50
0x50 R 0x8
NOTE 0x000200 0x0200 0x0200 0x24
0x24 R 0x4
NOTE 0x002050 0x2050 0x2050 0x50
0x50 R 0x4
Section to Segment mapping:
Segment Sections...
00 .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr
01 .text
02 .note.4 .note.1 .note.2 .note.3
03 .dynamic
04 .dynamic
05 .note.4 .note.1
06 .note.gnu.build-id
07 .note.2 .note.3
--
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo