lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC] Add L1 symbol section supporting in kallsyms.c
Hi all,

We are maintaining linux kernel for the ADI Blackfin CPU which has
L1 text and data rams. To make use of the L1 memory we add a new text
section call text_l1. So kallsyms.c need to be modified to search the
new section and generate the right Sysmap.map.

Currently we add the section support directly. Or do it in a more
common way for future extending? Any comments? Thanks!


Index: git/linux-2.6/scripts/kallsyms.c
===================================================================
--- git.orig/linux-2.6/scripts/kallsyms.c
+++ git/linux-2.6/scripts/kallsyms.c
@@ -12,6 +12,8 @@
* (25/Aug/2004) Paulo Marques <pmarques@grupopie.com>
* Changed the compression method from stem compression to "table lookup"
* compression
+ * (10/Jul/2006) Robin Getz <rgetz@blackfin.uclinux.org>
+ * Add _stext_l1, _etext_l1 for the L1 memory section in Blackfin.
*
* Table compression uses all the unused char codes on the symbols and
* maps these to the most used substrings (tokens). For instance, it might
@@ -44,6 +46,7 @@ struct sym_entry {
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_l1, _etext_l1;
static int all_symbols = 0;
static char symbol_prefix_char = '\0';

@@ -103,6 +106,10 @@ static int read_symbol(FILE *in, struct
_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 */
@@ -166,7 +173,8 @@ static int symbol_valid(struct sym_entry
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
--
Best regards,
Luke Yang
luke.adi@gmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 06:45    [W:4.004 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site