Jump to page: 1 2
Thread overview
DMD 0.64 release
May 12, 2003
Walter
May 12, 2003
John Reimer
May 12, 2003
Olaf Rogalsky
May 12, 2003
Walter
May 13, 2003
Walter
May 13, 2003
Walter
May 13, 2003
John Reimer
May 12, 2003
Bill Cox
May 12, 2003
Bill Cox
May 12, 2003
John Reimer
May 12, 2003
John Reimer
May 14, 2003
Walter
May 14, 2003
Walter
May 12, 2003
Made many suggested changes to the linux setup. Hopefully fixed bad section name bug.

http://www.digitalmars.com/d/changelog.html



May 12, 2003
On Mon, 12 May 2003 02:18:12 -0700, Walter wrote:

> Made many suggested changes to the linux setup. Hopefully fixed bad section name bug.
> 
> http://www.digitalmars.com/d/changelog.html

Hi walter,

Working better! But I still get one relocation error.  It's completely different:

../../bin/dmd -I/home/john/dmd/src/phobos hello.d

gcc hello.o -o hello -lphobos -lpthread -lm
/usr/bin/ld:
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../libphobos.a(gc.o): bad
relocation section name `.rel.gnu.linkonce.t_d_new?'

Otherwise still links to a runnable hello.  As you can see, dmd still can't seem to access my dmd.conf even in /etc. If I don't include the -I switch, it just complains about not being able to find object.d again. I still don't know why.

Nice to see the linker step integration in place. Thanks!

later,

John
May 12, 2003
Closer... I get another linker warning (but hello still linked).

/usr/bin/ld: ../dmd/lib/libphobos.a(gc.o): bad relocation section name `.rel.gnu.linkonce.t_d_new?'

Again, I'm on Linux 7.3 with gcc version 29.6.  I've also got gcc 3.3 (experimental) version on my machine.  It shows the same behavior.

BTW: Kudos on the linux port!

Bill

Walter wrote:
> Made many suggested changes to the linux setup. Hopefully fixed bad section
> name bug.
> 
> http://www.digitalmars.com/d/changelog.html
> 
> 
> 

May 12, 2003
I tried to go a bit further than hello.d...

I compiled d2html.d, using dmd -c d2html.d, and then
gcc -o d2html d2html.o ~/dmd/lib/libphobos.a -lpthread -lm

I'm using gcc 2.94.  When I type "d2html hello.d", it crashes with a segv.  Using ddd, I printed the backtrace:

#0  0x00000000 in ?? ()
#1  0x0804f1c2 in _Dgcx_Gcx_fullcollectshell_FZk ()
#2  0x0804f0b6 in _Dgcx_Gcx_fullcollectshell_FZk ()
#3  0x0804e1db in _Dgcx_GC_malloc_FkZPv ()
#4  0x0804db1a in _d_newclass ()
#5  0x0804bc42 in _Dstream_Stream_readExact_FPvkZv ()
#6  0x0804bd86 in _Dstream_Stream_read_FJeZv ()
#7  0x080494a2 in _Dmain ()
#8  0x0804a482 in main ()
#9  0x42017499 in __libc_start_main () from /lib/i686/libc.so.6

Bill

Walter wrote:
> Made many suggested changes to the linux setup. Hopefully fixed bad section
> name bug.
> 
> http://www.digitalmars.com/d/changelog.html
> 
> 
> 

May 12, 2003
On Mon, 12 May 2003 08:57:42 -0400, Bill Cox wrote:

> I tried to go a bit further than hello.d...
> 
> I compiled d2html.d, using dmd -c d2html.d, and then
> gcc -o d2html d2html.o ~/dmd/lib/libphobos.a -lpthread -lm
> 
> I'm using gcc 2.94.  When I type "d2html hello.d", it crashes with a segv.  Using ddd, I printed the backtrace:
> 
> #0  0x00000000 in ?? ()
> #1  0x0804f1c2 in _Dgcx_Gcx_fullcollectshell_FZk ()
> #2  0x0804f0b6 in _Dgcx_Gcx_fullcollectshell_FZk ()
> #3  0x0804e1db in _Dgcx_GC_malloc_FkZPv ()
> #4  0x0804db1a in _d_newclass ()
> #5  0x0804bc42 in _Dstream_Stream_readExact_FPvkZv ()
> #6  0x0804bd86 in _Dstream_Stream_read_FJeZv ()
> #7  0x080494a2 in _Dmain ()
> #8  0x0804a482 in main ()
> #9  0x42017499 in __libc_start_main () from /lib/i686/libc.so.6

I decided to give this a try on my system, and surprisingly came up with similar results.

With gcc 3.2.2, running "d2html hello.d", the program crashes with the segmentation fault.  Following Bills lead, I printed out a very similar backtrace:

#0  0x00000000 in ?? ()
#1  0x0804f176 in _Dstream_MemoryStream__ctor_FZC12MemoryStream ()
#2  0x0804f06a in _Dstream_MemoryStream__ctor_FZC12MemoryStream ()
#3  0x0804e18f in _Dstream_MemoryStream__ctor_FZC12MemoryStream ()
#4  0x0804dace in _Dstream_MemoryStream__ctor_FZC12MemoryStream ()
#5  0x0804bbf6 in _Dstream_Stream_readExact_FPvkZv ()
#6  0x0804bd3a in _Dstream_Stream_read_FJaZv ()
#7  0x08049456 in _Dmain ()
#8  0x0804a436 in main ()
#9  0x400acb97 in __libc_start_main () from libc.so.6





May 12, 2003
well perhaps not so similar.
May 12, 2003
"Bill Cox" <bill@viasic.com> escribió en el mensaje
news:3EBF9A46.5030006@viasic.com...
| I tried to go a bit further than hello.d...
|
| I compiled d2html.d, using dmd -c d2html.d, and then
| gcc -o d2html d2html.o ~/dmd/lib/libphobos.a -lpthread -lm
| ...

Last I remember, d2html didn't work because d2html.kwd doesn't exist. I'm just downloading 0.64 so I can't see if it's included or not (but I think not). However, I tried to compile it with 0.63 and I get "Error 42: Symbol Undefined __d_arraycatn".

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06


May 12, 2003
John Reimer wrote:

> gcc hello.o -o hello -lphobos -lpthread -lm
> /usr/bin/ld:
> /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../libphobos.a(gc.o): bad
> relocation section name `.rel.gnu.linkonce.t_d_new?'
I suspect that the linker can't do nonascii symbols. Lets make a hex dump of the error message:

~/dmd>dmd -I/home/rogalsky/dmd/src/phobos samples/d/hello.d 2>&1|od -ctx1
0000000   g   c   c       h   e   l   l   o   .   o       -   o       h
        67 63 63 20 68 65 6c 6c 6f 2e 6f 20 2d 6f 20 68
0000020   e   l   l   o       -   l   p   h   o   b   o   s       -   l
        65 6c 6c 6f 20 2d 6c 70 68 6f 62 6f 73 20 2d 6c
0000040   p   t   h   r   e   a   d       -   l   m      \n   /   u   s
        70 74 68 72 65 61 64 20 2d 6c 6d 20 0a 2f 75 73
0000060   r   /   b   i   n   /   l   d   :       /   u   s   r   /   l
        72 2f 62 69 6e 2f 6c 64 3a 20 2f 75 73 72 2f 6c
0000100   i   b   /   l   i   b   p   h   o   b   o   s   .   a   (   g
        69 62 2f 6c 69 62 70 68 6f 62 6f 73 2e 61 28 67
0000120   c   .   o   )   :       b   a   d       r   e   l   o   c   a
        63 2e 6f 29 3a 20 62 61 64 20 72 65 6c 6f 63 61
0000140   t   i   o   n       s   e   c   t   i   o   n       n   a   m
        74 69 6f 6e 20 73 65 63 74 69 6f 6e 20 6e 61 6d
0000160   e       `   .   r   e   l   .   g   n   u   .   l   i   n   k
        65 20 60 2e 72 65 6c 2e 67 6e 75 2e 6c 69 6e 6b
0000200   o   n   c   e   .   t   _   d   _   n   e   w 250 004   '  \n
        6f 6e 63 65 2e 74 5f 64 5f 6e 65 77 a8 04 27 0a

The culprit is the section name ".rel.gnu.linkonce.t_d_new\250\004"! Hope this helps.


Is it possible to get the assembler output of dmd, or is there no intermediate assembly stage.


Olaf


-- 
+----------------------------------------------------------------------+ I Dr. Olaf Rogalsky                         Institut f. Theo. Physik I I I Tel.: 09131 8528440                       Univ. Erlangen-Nuernberg   I I Fax.: 09131 8528444                       Staudtstrasse 7 B3         I I rogalsky@theorie1.physik.uni-erlangen.de  D-91058 Erlangen           I +----------------------------------------------------------------------+
May 12, 2003
"Olaf Rogalsky" <olaf.rogalsky@theorie1.physik.uni-erlangen.de> wrote in message news:3EBFB609.F06CD2DD@theorie1.physik.uni-erlangen.de...
> Is it possible to get the assembler output of dmd,

Yes. Run dumpobj or obj2asm on the .o file.


May 13, 2003
"John Reimer" <jjreimer@telus.net> wrote in message news:pan.2003.05.12.12.05.41.484927@telus.net...
> gcc hello.o -o hello -lphobos -lpthread -lm
> /usr/bin/ld:
> /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../libphobos.a(gc.o): bad
> relocation section name `.rel.gnu.linkonce.t_d_new?'

This is fixed now.

> Otherwise still links to a runnable hello.  As you can see, dmd still can't seem to access my dmd.conf even in /etc. If I don't include the -I switch, it just complains about not being able to find object.d again. I still don't know why.

Did you edit the contents of /etc/dmd.conf?


« First   ‹ Prev
1 2