Skip to content

Commit

Permalink
sparc: Fix piggyback with newer binutils.
Browse files Browse the repository at this point in the history
Newer versions of binutils mark '_end' as 'B' instead of 'A' for
whatever reason.

To be honest, the piggyback code doesn't actually care what kind
of symbol _start and _end are, it just wants to find them and
record the address.

So remove the type from the match strings.

Reported-by: Aaro Koskinen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Dec 3, 2012
1 parent de7531e commit 0032c85
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/sparc/boot/piggyback.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,27 @@ static void usage(void)

static int start_line(const char *line)
{
if (strcmp(line + 8, " T _start\n") == 0)
if (strcmp(line + 10, " _start\n") == 0)
return 1;
else if (strcmp(line + 16, " T _start\n") == 0)
else if (strcmp(line + 18, " _start\n") == 0)
return 1;
return 0;
}

static int end_line(const char *line)
{
if (strcmp(line + 8, " A _end\n") == 0)
if (strcmp(line + 10, " _end\n") == 0)
return 1;
else if (strcmp (line + 16, " A _end\n") == 0)
else if (strcmp (line + 18, " _end\n") == 0)
return 1;
return 0;
}

/*
* Find address for start and end in System.map.
* The file looks like this:
* f0004000 T _start
* f0379f79 A _end
* f0004000 ... _start
* f0379f79 ... _end
* 1234567890123456
* ^coloumn 1
* There is support for 64 bit addresses too.
Expand Down

0 comments on commit 0032c85

Please sign in to comment.