-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChangeLog
165 lines (115 loc) · 5.79 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
2024-01-17 Duncan McIntosh <duncan82013@live.ca>
Remove uu_dict_lookup, as it's (ironically) unused.
Found with unused itself!
* dict.c: Remove implementation.
* dict.h: Remove prototype.
2024-01-17 Duncan McIntosh <duncan82013@live.ca>
Add some documentation.
This includes an mdoc-based manual page and README, to try and make
the project somewhat more discoverable.
* unused.1: Simple manual page for the program.
* README.md: Introduction to the project.
2024-01-17 Duncan McIntosh <duncan82013@live.ca>
Use updated init_diassemble_info prototype.
This presumably changed with a recent binutils release, so
keep using the same code but add a thunk for compatibility.
* backends/libopcodes.c: Add a thunk for fprintf_styled_ftype.
2021-03-22 thatlittlegit <duncan82013@live.ca>
Adds a BdDisasm backend. This is faster, but seems to give slightly
different results; it seems to be fairly close, though.
Committed 2021-04-09.
* backends/libbddisasm.c: Add a bddisasm backend.
* meson.build, meson_options.txt: Add a bddisasm option.
2021-03-22 thatlittlegit <duncan82013@live.ca>
This adds an option for which disassembler to use. The default is, and
will likely remain, libopcodes.
* meson.build: Only build libopcodes support if told.
* meson_options.txt: Add an option to select the disassembler.
2021-03-22 thatlittlegit <duncan82013@live.ca>
* meson.build: Reformat.
2021-03-22 thatlittlegit <duncan82013@live.ca>
Clean up include statements with include-what-you-use.
* backend.h: Forward-declare uu_dict.
* backend/libopcodes.c: Include string.h and bfd.h instead of relying
on other files.
* dict.h, dict.h: Remove include of <stdint.h>.
2021-03-22 thatlittlegit <duncan82013@live.ca>
Separate the libopcodes backend into a separate file.
Now, more backends can be fairly easily added. I'll need to do some
work with the Meson file first, but that's just making it look better.
Then, just implementing uu_backend creates an entire new backend with
minimal work.
* backend/libopcodes.c, unused.c: Separate the libopcodes backend.
* unused.c: Use uu_backend instead of process_section.
* backend.h: Add a header for uu_backend.
* meson.build: Also build backend/libopcodes.c.
2021-03-22 thatlittlegit <duncan82013@live.ca>
Only remove the symbol from the table when we see it.
We wouldn't reset fprintf_data.value, and therefore we would call
uu_dict_remove on every instruction. I think this shaves a second, but
I don't think it's that much (probably more chance.)
* unused.c: Reset fprintf_data.value between iterations.
2021-03-22 thatlittlegit <duncan82013@live.ca>
Only buffer the disassembly if we're actually going to look at it.
We used to need to do all of this, but now with fake_fprintf there's
no need to.
* unused.c: Only buffer disassembly if needed.
2021-03-22 thatlittlegit <duncan82013@live.ca>
Reorganize fake_fprintf a little. No real change, found when trying to
optimize (unsuccessfully).
* unused.c: Reorganize fake_fprintf
2021-03-21 thatlittlegit <duncan82013@live.ca>
Only fprintf to debug if we're actually in debug mode.
It turns out this saves 7s with libxul!
* debug.h: Add a debugging function header.
* debug.c: Add a waste of space.
* unused.c: Use debug() instead of fprintf(debug).
* meson.build: Build debug.c.
2021-03-21 thatlittlegit <duncan82013@live.ca>
Use a dictionary to keep track of functions instead of lists.
This means that we no longer have to look through the list of symbols
so much, and thus can be very fast. libxul takes 17s (!) now!
* dict.h: Add a dictionary header.
* dict.c: Add a basic dictionary implementation.
* unused.c: Use a dictionary instead of arrays to store symbols.
* meson.build: Build dict.c.
2021-03-21 thatlittlegit <duncan82013@live.ca>
Use a custom function to replace fprintf unless we're in debug mode.
fake_fprintf() avoids running fprintf, and it is a lot faster! I found
before I could run this on libxul.so as a test, and it not once
started printing anything out. Now? Thirty seconds or so and we're
printing. Incredible.
* unused.c: Use a custom function to replace fprintf.
2021-03-21 thatlittlegit <duncan82013@live.ca>
Allows compilation with C++. This isn't very well supported by Meson
at this point, but it does mean that we meet higher type-safety
standards. I mean, we cast everything, but oh well.
* unused.c: Allow compilation with C++ by adding casts on
reallocarray.
2021-03-19 thatlittlegit <duncan82013@live.ca>
Fixes the debug FILE* not having correct permissions, or a potential
segfault if /dev/null can't be opened for some reason.
* unused.c: Fix the debug stream's permissions and error handling.
2021-03-19 thatlittlegit <duncan82013@live.ca>
Fixes some memory leaks in unused.c.
* unused.c: Fix some memory leaks.
2021-03-18 thatlittlegit <duncan82013@live.ca>
Migrate to ANSI C. Why? Why not?
One inspiration for this was the Hundred Rabbits <https://100r.co>,
who have written plenty of utilities in ANSI C.
It's surprisingly not that bad, but I don't know why I do this to
myself.
* unused.c: Get rid of sanity.
* unused.c: Define _DEFAULT_SOURCE and _POSIX_C_SOURCE to get access
to various functions that aren't available in C89 by default.
* meson.build: Use c89 as the default C standard version.
2021-03-18 thatlittlegit <duncan82013@live.ca>
This adds disassembly so then we can actually see what symbols are
actually being used. Frankly, it's surprisingly close to done at this
point! :D
* unused.c: Use libopcodes to do disassembly.
* meson.build: Add libopcodes as a dependency.
2021-03-18 thatlittlegit <duncan82013@live.ca>
* .clang-format: Add basic clang-format file with some alright formatting.
* meson.build: Add initial Meson build file.
* unused.c: Add basic C skeleton that prints all the functions in a file.