[Bug binutils/4007] problems with linker / strip / BFD

2007-02-15 Thread etienne_lorrain at yahoo dot fr

--- Additional Comments From etienne_lorrain at yahoo dot fr  2007-02-15 
13:46 ---
  I have the vmlinux ELF file here, but it is bigger than the maximum
 attachement size. Is there a public ftp server useable or shall I
 mail it somewhere? (compressed: 2.5 Mbytes).

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4007

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4045] objdump -m avr -D prefixes memory addresses with "0x0x" in comments

2007-02-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2007-02-15 16:12 
---
Created an attachment (id=1553)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1553&action=view)
attempting to detect files which do not have symbol tables and adjust output
accordingly


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4045

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4045] objdump -m avr -D prefixes memory addresses with "0x0x" in comments

2007-02-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2007-02-15 16:13 
---
Hi Timo,

  Please could you try the uploaded patch which should fix this problem.  (For
now anyway.  Really though we need to rework the disassembler's address print
functions).

Cheers
  Nick


-- 
   What|Removed |Added

 Status|NEW |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=4045

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4045] objdump -m avr -D prefixes memory addresses with "0x0x" in comments

2007-02-15 Thread timo dot lindfors at iki dot fi

--- Additional Comments From timo dot lindfors at iki dot fi  2007-02-15 
16:46 ---
Yes, the patch fixes the output for rjmp's. However,
now jmp's look even more funny:

Steps to reproduce:
1) echo -en "\x0c\x94\x2a\x00" > jmp.bin
2) objdump -m avr -b binary -D jmp.bin

Expected results:
2) 0:   0c 94 2a 00 jmp 0x54

Actual results:
2) 0:   0c 94 2a 00 jmp 0x540x54


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4045

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4045] objdump -m avr -D prefixes memory addresses with "0x0x" in comments

2007-02-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2007-02-15 16:58 
---
Created an attachment (id=1554)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1554&action=view)
revised version of previous patch


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4045

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4045] objdump -m avr -D prefixes memory addresses with "0x0x" in comments

2007-02-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2007-02-15 16:59 
---
Doh!  I forgot to include some text in order to force the comment character to
be generated.  Please try out the revised version of the patch which has just
been uploaded.

Cheers
  Nick



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4045

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


Re: GOT error in gas

2007-02-15 Thread Nick Clifton

Hi Mikulas,


__asm__ (".global number; number = 0x12345678");
extern void number;



These two declarations are not compatible.  The latter declares number as
a data symbol, but the former defines it is an absolute symbol.



I thought that .types do not care for linking,


Andreas is not talking about .types.  He is talking about the sections 
to which the symbol belongs.  Writing "extern void number" declares 
"number" as a symbol that will live in the .data section(1).  The 
address of "number" is not known until the linker has performed a final 
link (for static code) or the loader has initialised the executable (for 
PIC code).


Writing "__asm__(".global number; number=0x12345678")" however declares 
"number" as a symbol with an absolute *address*.  The symbol does not 
have a value, or rather its value is whatever happens to be in the 
memory location 0x12345678.  This symbol does not live in a section, and 
its address does not change during linking or loading.


Hence the two declarations are inconsistent and you get undefined behaviour.


How otherwise should external C variables be placed at absolute 
locations? 



You could adapt the mechanism that you already have.  You say that 
everything works if the __asm__ statement is in a separate compilation 
unit, so just split out all of your absolute C variables into one (or 
more) separate files and have a header file containing "extern void..." 
declarations for them.


Alternatively you could provide the addresses for these symbols via a 
linker script, rather than trying to define them in C.  For example:


  % cat addr.t
  number = ABSOLUTE (0x12345678);

  % cat test.c
  #include 
  extern void number;
  int main (void) { return printf ("%p\n", & number); }

  % gcc test.c -Wl,addr.t -fPIC

  % ./a.out
  0x12345678

Cheers
  Nick

(1) Or some similar section such as .common or .sdata.



___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/4045] objdump -m avr -D prefixes memory addresses with "0x0x" in comments

2007-02-15 Thread timo dot lindfors at iki dot fi

--- Additional Comments From timo dot lindfors at iki dot fi  2007-02-15 
17:34 ---
rjmp and jmp look ok in a flat binary file now. However, "0x0x" is still printed
with stripped ELF files:

Steps to reproduce:
1) cat > testcase.c <



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4045

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/3998] Weird path problem

2007-02-15 Thread nickc at redhat dot com

--- Additional Comments From nickc at redhat dot com  2007-02-15 17:52 
---
Hi Daniel,

  The linker is trying to tell you that it has been given an absolute path to a
specific file (libcrt.so in your example) and asked to load it, *BUT*, the
linker is also operating in a sysrooted environment, so the absolute path has
been made relative to the sysroot (/some/absolute/path in your case).  ie the
linker has tried to find the file:

  /some/absolute/path/some/absolute/path/lib/libcrt.so

and failed.  The first three directories in this path have come from your
sysroot, the remaining directories from the absolute path to the libcrt.so file.

Presumably you either want to make the above directory and copy the right
version of libcrt.so into it, or else change your sysroot to somewhere that
contains some/absolute/path/lib/libcrt.so, or else replace the absolute path to
libcrt.so with a relative path (eg "lib/libcrt.so").

If this does not help, then please could you put together a small demonstration
of the problem as it happens to you so that we can attempt to reproduce it
ourselves.

Cheers
  Nick

-- 
   What|Removed |Added

 Status|NEW |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=3998

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/3998] Weird path problem

2007-02-15 Thread bugzilla at poradnik-webmastera dot com

--- Additional Comments From bugzilla at poradnik-webmastera dot com  
2007-02-15 19:16 ---
Hi Nick,
I had found crosstool (http://kegel.com/crosstool/), and with its help I was
finally able to sucessfully compile binutils, glibc and gcc (I had to make some
changes manually because SunOS is a bit incompatible with GNU software ;)).
Therefore you can close this bug report.

Daniel

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3998

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils