File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -204,13 +204,26 @@ static int symbol_in_range(const struct sym_entry *s,
204
204
return 0 ;
205
205
}
206
206
207
+ static bool string_starts_with (const char * s , const char * prefix )
208
+ {
209
+ return strncmp (s , prefix , strlen (prefix )) == 0 ;
210
+ }
211
+
207
212
static int symbol_valid (const struct sym_entry * s )
208
213
{
209
214
const char * name = sym_name (s );
210
215
211
216
/* if --all-symbols is not specified, then symbols outside the text
212
217
* and inittext sections are discarded */
213
218
if (!all_symbols ) {
219
+ /*
220
+ * Symbols starting with __start and __stop are used to denote
221
+ * section boundaries, and should always be included:
222
+ */
223
+ if (string_starts_with (name , "__start_" ) ||
224
+ string_starts_with (name , "__stop_" ))
225
+ return 1 ;
226
+
214
227
if (symbol_in_range (s , text_ranges ,
215
228
ARRAY_SIZE (text_ranges )) == 0 )
216
229
return 0 ;
You can’t perform that action at this time.
0 commit comments