mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Getz <rgetz@blackfin.uclinux.org>
To: kai@germaschewski.name
Cc: linux-kernel@vger.kernel.org
Subject: ./scripts/kallsyms.c question
Date: Sun, 09 Jul 2006 22:26:39 -0400	[thread overview]
Message-ID: <6.1.1.1.0.20060709193540.01ec8370@ptg1.spd.analog.com> (raw)

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


             reply	other threads:[~2006-07-10  2:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10  2:26 Robin Getz [this message]
2006-07-10  3:10 ` Sam Ravnborg
2006-07-10  6:36 ` Robin Getz
2006-07-13 19:23   ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6.1.1.1.0.20060709193540.01ec8370@ptg1.spd.analog.com \
    --to=rgetz@blackfin.uclinux.org \
    --cc=kai@germaschewski.name \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®