[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/23658] Improve PT_NOTE segment creation
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/23658] Improve PT_NOTE segment creation |
Date: |
Thu, 04 Oct 2018 20:06:31 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23658
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
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 Type Address Off Size ES Flg
Lk Inf Al
[ 0] NULL 0000000000000000 000000 000000 00
0 0 0
[ 1] .note.4 NOTE 0000000000002000 002000 000028 00 A
0 0 8
[ 2] .note.1 NOTE 0000000000002028 002028 000028 00 A
0 0 8
[ 3] .note.gnu.build-id NOTE 0000000000000200 000200 000024 00 A
0 0 4
[ 4] .note.2 NOTE 0000000000002050 002050 000028 00 A
0 0 4
[ 5] .note.3 NOTE 0000000000002078 002078 000028 00 A
0 0 4
[ 6] .hash HASH 0000000000000228 000228 000030 04 A
8 0 8
[ 7] .gnu.hash GNU_HASH 0000000000000258 000258 00003c 00 A
8 0 8
[ 8] .dynsym DYNSYM 0000000000000298 000298 0000a8 18 A
9 1 8
[ 9] .dynstr STRTAB 0000000000000340 000340 000013 00 A
0 0 1
[10] .text PROGBITS 0000000000001000 001000 000010 00 AX
0 0 1
[11] .eh_frame PROGBITS 00000000000020a0 0020a0 000000 00 A
0 0 8
[12] .dynamic DYNAMIC 00000000000030a0 0020a0 0000c0 10 WA
9 0 8
[13] .symtab SYMTAB 0000000000000000 002160 0002e8 18
14 25 8
[14] .strtab STRTAB 0000000000000000 002448 000081 00
0 0 1
[15] .shstrtab STRTAB 0000000000000000 0024c9 000081 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 0x000000 0x0000000000000000 0x0000000000000000 0x000353
0x000353 R 0x1000
LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000010
0x000010 R E 0x1000
LOAD 0x002000 0x0000000000002000 0x0000000000002000 0x0000a0
0x0000a0 R 0x1000
LOAD 0x0020a0 0x00000000000030a0 0x00000000000030a0 0x0000c0
0x0000c0 RW 0x1000
DYNAMIC 0x0020a0 0x00000000000030a0 0x00000000000030a0 0x0000c0
0x0000c0 RW 0x8
NOTE 0x002000 0x0000000000002000 0x0000000000002000 0x000050
0x000050 R 0x8
NOTE 0x000200 0x0000000000000200 0x0000000000000200 0x000024
0x000024 R 0x4
NOTE 0x002050 0x0000000000002050 0x0000000000002050 0x000050
0x000050 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 ld/23658] Improve PT_NOTE segment creation, cvs-commit at gcc dot gnu.org, 2018/10/03
- [Bug ld/23658] Improve PT_NOTE segment creation, cvs-commit at gcc dot gnu.org, 2018/10/03
- [Bug ld/23658] Improve PT_NOTE segment creation, cvs-commit at gcc dot gnu.org, 2018/10/03
- [Bug ld/23658] Improve PT_NOTE segment creation, hjl.tools at gmail dot com, 2018/10/03
- [Bug ld/23658] Improve PT_NOTE segment creation, cvs-commit at gcc dot gnu.org, 2018/10/04
- [Bug ld/23658] Improve PT_NOTE segment creation,
hjl.tools at gmail dot com <=
- [Bug ld/23658] Improve PT_NOTE segment creation, hjl.tools at gmail dot com, 2018/10/04
- [Bug ld/23658] Improve PT_NOTE segment creation, cvs-commit at gcc dot gnu.org, 2018/10/08
- [Bug ld/23658] Improve PT_NOTE segment creation, hjl.tools at gmail dot com, 2018/10/08