mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* ./scripts/kallsyms.c question
@ 2006-07-10  2:26 Robin Getz
  2006-07-10  3:10 ` Sam Ravnborg
  2006-07-10  6:36 ` Robin Getz
  0 siblings, 2 replies; 4+ messages in thread
From: Robin Getz @ 2006-07-10  2:26 UTC (permalink / raw)
  To: kai; +Cc: linux-kernel

The application kallsyms generate assembler source containing symbol 
information, where "symbol information" is in these pre-defined names:

  _stext, _etext, _sinittext, _einittext, _sextratext, _eextratext

I am working with a processor (Blackfin) which uses these plus two others 
_stext_l1, and _etext_l1.

I can add these in the same fashion as the existing (see below), but was 
wondering if this shouldn't be re-structured with a struct/loop rather than 
the existing n lines of if/else?

Thanks
-Robin

--- ./kallsyms.c.org    2006-04-02 15:42:50.000000000 -0400
+++ ./kallsyms.c        2006-04-02 15:57:25.000000000 -0400
@@ -43,7 +43,7 @@

  static struct sym_entry *table;
  static unsigned int table_size, table_cnt;
-static unsigned long long _stext, _etext, _sinittext, _einittext, 
_sextratext, _eextratext;
+static unsigned long long _stext, _etext, _sinittext, _einittext, 
_sextratext, _eextratext;
+static unsigned long long _stext_l1, _etext_l1;
  static int all_symbols = 0;
  static char symbol_prefix_char = '\0';

@@ -103,6 +103,10 @@
                 _sextratext = s->addr;
         else if (strcmp(sym, "_eextratext") == 0)
                 _eextratext = s->addr;
+       else if (strcmp(sym, "_stext_l1" ) == 0)
+               _stext_l1 = s->addr;
+       else if (strcmp(sym, "_etext_l1" ) == 0)
+               _etext_l1 = s->addr;
         else if (toupper(stype) == 'A')
         {
                 /* Keep these useful absolute symbols */
@@ -161,7 +165,8 @@
         if (!all_symbols) {
                 if ((s->addr < _stext || s->addr > _etext)
                     && (s->addr < _sinittext || s->addr > _einittext)
-                   && (s->addr < _sextratext || s->addr > _eextratext))
+                   && (s->addr < _sextratext || s->addr > _eextratext)
+                   && (s->addr < _stext_l1 || s->addr > _etext_l1))
                         return 0;
                 /* Corner case.  Discard any symbols with the same value as
                  * _etext _einittext or _eextratext; they can move between 
pass


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-13 19:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-10  2:26 ./scripts/kallsyms.c question Robin Getz
2006-07-10  3:10 ` Sam Ravnborg
2006-07-10  6:36 ` Robin Getz
2006-07-13 19:23   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®