public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Does u-boot relocate absolute symbols?
Date: Thu, 30 Jun 2005 13:28:32 -0400	[thread overview]
Message-ID: <42C42BC0.2050309@smiths-aerospace.com> (raw)
In-Reply-To: <DCEAAC0833DD314AB0B58112AD99B93B8593E2@ismail.innsys.innovsys.com>

Rune Torgersen wrote:
> Wow.... This surprises me...
> I have alwayts thought that *test and test[] would be the same thing.
> 
> Only solutionI can see is to change the definition in common.c to be
> *test, this will still get the address of test[] defined elsewhere.
> (See attached files)
> 
> 
>>Sure, I've tried this. This is the point, where my problem 
>>arose. Attached you find two 
>>small files, you can easily compile under linux (gcc -o 
>>arrtest -I ./ ./common.c 
>>./array.c). The file "common.c" represents the code I can't 
>>(don't want to) touch. 
>>"array.c" represents my project dependent code. If you run 
>>arrtest it will show to you, 

With the patch in place (previously sent to the list), it works for linux:

vanbaren at sherwood:~/x> ll
total 32
-rwxr-----  1 vanbaren users  200 Jun 30 13:24 array.c
-rwxr-xr-x  1 vanbaren users 8963 Jun 30 13:26 arrtest
-rwxr-----  1 vanbaren users  132 Jun 30 08:03 common.c
-rwxr-----  1 vanbaren users  121 Jun 30 08:03 common.c-original
-rw-r--r--  1 vanbaren users  237 Jun 30 08:04 common.c.diff
-rwxr-----  1 vanbaren users   24 Jun 30 13:23 common.h
vanbaren at sherwood:~/x> gcc -o arrtest -I ./ ./common.c ./array.c
vanbaren at sherwood:~/x> ./arrtest
*test: 0x08048558
test[]: 0x08048558

gvb

  reply	other threads:[~2005-06-30 17:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 16:54 [U-Boot-Users] Does u-boot relocate absolute symbols? Rune Torgersen
2005-06-30 17:28 ` Jerry Van Baren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-07-01  8:01 Andreas Block
2005-07-01  7:57 Andreas Block
2005-07-01 14:35 ` Jerry Van Baren
2005-07-01 15:06   ` Andreas Block
2005-06-29 15:46 Rune Torgersen
2005-06-30  7:45 ` Andreas Block
2005-06-30 10:46   ` Wolfgang Denk
2005-06-30 11:42     ` Andreas Block
2005-06-30 12:40       ` Wolfgang Denk
2005-06-30 13:38         ` Andreas Block
2005-06-30 12:05   ` Jerry Van Baren
2005-06-30 12:44     ` Andreas Block
2005-06-14  9:47 Andreas Block

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=42C42BC0.2050309@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace.com \
    --cc=u-boot@lists.denx.de \
    /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