Some of these things are already done. More are probably done,
[platform/upstream/binutils.git] / bfd / TODO
1 Things that still need to be handled: -*- Text -*-
2
3  o - change the memory usage to reflect the message which follows the
4      page break.
5  o - implement bfd_abort, which should close the bfd but not alter the
6      filesystem.
7  o - update the bfd doc; write a how-to-write-a-backend doc.
8  o - change reloc handling as per Steve's suggestion.
9      (more details please.....)
10 \f
11 Changing the way bfd uses memory.  The new convention is simple: 
12
13  o - bfd will never write into user-supplied memory, nor attempt to
14      free it.
15  o - closing a bfd may reclaim all bfd-allocated memory associated
16      with that bfd.
17  - - bfd_target_list will be the one exception; you must reclaim the
18      returned vector yourself.
19
20 Interface implications are minor (get_symcount_upper_bound will go
21 away; bfd_cannicalize_symtab will allocate its own memory, etc).
22
23 Certain operations consume a lot of memory; for them manual
24 reclaimation is available:
25
26  o - bfd_canonicalize_symtab will return a pointer to a
27      null-terminated vector of symbols.  Subsequent calls may or may
28      not return the same pointer.
29      bfd_canonicalize_relocs will do the same; returning a pointer to
30      an array of arelocs.  Calling this function will read symbols in
31      too.
32
33  o - bfd_reclaim_relocs will free the memory used by these relocs.
34      the symbols will be untouched.
35      bfd_reclaim_symtab (ne bfd_reclaim_symbol_table) will free the
36      memory allocated by canonialize_symtab.  
37      Since relocations point to symbols, any relocations obtained by a
38      call to bfd_canonicalize_relocs will be reclaimed as well.
39
40  o - if you don't call the reclaim_ functions, the memory will be
41      reclaimed at bfd_close time.