]>
Commit | Line | Data |
---|---|---|
4a81b561 DHW |
1 | Things that still need to be handled: -*- Text -*- |
2 | ||
4a81b561 DHW |
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. | |
4a81b561 DHW |
7 | o - update the bfd doc; write a how-to-write-a-backend doc. |
8 | o - change reloc handling as per Steve's suggestion. | |
6dadbcb6 | 9 | (more details please.....) |
4a81b561 DHW |
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. |