Imported Upstream version 0.155
[platform/upstream/elfutils.git] / TODO
1                       ToDo list for elfutils                      -*-outline-*-
2                       ----------------------
3
4 Time-stamp: <2009-02-05 22:08:01 drepper>
5
6 * mkinstalldirs
7
8   Remove everywhere.  Use mkdir -p.
9
10 * libelf:
11
12 ** verify section
13
14    Currently the elf_update function trusts the user blindly if the
15    ELF_F_LAYOUT flag is set.  This is OK if the data is prepared by a
16    ELF_C_NULL call but not if the user prepared the data herself
17
18 ** break out archive handling from elf_begin
19
20    The handling of archives (especially of the symbol tables) must be
21    broken out of elf_begin.  There are several different forms of
22    archives and only when having the archive handling separately this
23    remains maintainable.
24
25 ** shdrs in read-only files
26
27    When reading (ELF_C_READ*) then there is no need to malloc Shdr
28    structure in elfXX_getshdr if file is mmaped and unaligned access
29    is allowed or the structure is aligned.  Use ELF_F_MALLOCED flag
30    to differentiate.
31
32 ** shdrs after elf_cntl (ELF_C_FDREAD)
33
34    Similar to the above. After ELF_C_FDREAD the file is completely
35    in memory.  See also this mailing list thread:
36    https://fedorahosted.org/pipermail/elfutils-devel/2012-July/002368.html
37
38 * libdw
39
40 ** More memory access checks needed
41
42    All accesses to the debug sections should make sure the offsets are
43    valid.  This is currently especially a problem with leb128 accesses.
44
45 ** Low level macro information operations
46
47    in 5.11.3 are not implemented.  gcc currently does not emit this
48    information so I cannot test it.
49
50 ** Rename dwarf_getabbrev
51
52
53 * libcpu
54
55 ** x86
56
57 *** Opcodes
58
59      crc32
60      extractps
61      pextrb
62      pextrd/pextrq
63      pextrw
64      pinsrq
65      popcnt 64-bit reg
66
67 * nm:
68
69 ** add demangler support
70
71    Use demangler from libiberty.
72
73 ** add support to read debugging symbols
74
75    Implement -l option for BSD and POSIX format
76
77
78 * strip:
79
80 ** support SHT_SYMTAB_SHNDX
81
82    should be removed if not needed anymore
83
84 * ld:
85
86 ** sanity check .rel sh_info content
87
88    the sh_info of all .rel sections with the same name must point to
89    sections which also have the same name
90
91 ** use ld.so.conf
92
93    to locate shared libraries also use /etc/ld.so.conf
94
95 ** handle object files for different architectures
96
97    ld.so is expected to ignore object files for different architectures and
98    continue looking for a matching file (e.g., ignore 32-bit binaries on
99    64-bit platforms and vice versa).  We probably need the same in ld.
100
101 ** reuse after elf_end
102
103    Some files are closed using elf_end.  They are removed from memory only
104    if no reference is left (especially for archives this is a problem).
105    The old mapping should be reused in that case.  The problem is worse
106    for files which are not mapped read-only (archives again).
107
108 ** size for STT_SECTION entries
109
110    The STT_SECTION entries have zero for the size but can easily get
111    the size of the section.
112
113 ** .eh_frame_hdr
114
115    Not implemented at all in the moment except for recognition of the option
116    itself.
117
118 ** variables with aliases in executables
119
120    When linking an executable with a references against a variable in a
121    DSO, create symbol table entries for all the aliases of the variable
122    in the DSO and create a relocation for one of them (a non-weak
123    definition)
124
125 * elflint
126
127 ** additional checks
128
129    1st GOT entry == _DYNAMIC
130
131    check versioning info:
132
133      always BASE in verdef
134      sh_size/sh_entsize matches last offset != 0
135
136    check whether any relocation is for a merge-able section
137
138    check TLS relocation depencies
139
140    Check content of .eh_frame_hdr, .eh_frame, .gcc_except_table
141
142 *** for x86
143
144     check that R_386_TLS_GD is followed by R_386_PLT32 for __tls_get_addr
145
146 ** relax
147
148    prelink generated files
149
150 * elfcmp
151
152 ** treat relocation sections special
153
154    Differences in the relocation sections can be ignored if all
155    the same symbols with the same targets are present and the order
156    of overlapping relocations doesn't change.  There really never
157    should be overlapping relocations but who knows.
158
159 * mcs
160
161   Sun has it.  Can modify sections which are not in segments.
162
163      -a string
164            Append string to the comment section of the ELF object
165            files. If  string contains embedded blanks, it must be
166            enclosed in quotation marks.
167
168      -c    Compress the contents of the comment  section  of  the
169            ELF  object  files. All duplicate entries are removed.
170            The ordering of the  remaining  entries  is  not  dis-
171            turbed.
172
173      -d    Delete the contents of the comment  section  from  the
174            ELF  object  files. The section header for the comment
175            section is also removed.
176
177      -n name
178            Specify the name of the comment section to  access  if
179            other  than  .comment.  By default, mcs deals with the
180            section named .comment. This option  can  be  used  to
181            specify  another  section.  mcs  can  take multiple -n
182            options to allow for specification of   multiple  sec-
183            tion comments.
184
185      -p    Print the contents of the comment section on the stan-
186            dard  output.  Each  section  printed is tagged by the
187            name of the file from which it  was  extracted,  using
188            the  format  file[member_name]:  for archive files and
189            file:  for other files.
190
191      -V    Print on standard error the version number of mcs.
192
193 Local Variables:
194 eval:(hide-sublevels 3)
195 End: