This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

What changed in ld?


Hello, I posted this in the FreeBSD hackers list and was referred
to you. I was told that when I upgraded to FreeBSD 4.3, I also
upgraded binutils from 2.9.1 to 2.10.1.

I am the author of the assembly language tutorial for FreeBSD
(http://www.int80h.org/bsdasm/), but something has changed in ld
that causes programs assembled with nasm 0.98 and linked with ld
crash with the bus error when having uninitialized data in the
.bss section. This worked with no problems with ld from binutils
2.9.1.

My original message follows. Please advise (I am not subscribed
to this list, so please CC your advice to me). Thank you,

Adam

>Delivered-To: whizkid-whizkidtech:net-adam@whizkidtech.net
>X-Envelope-To: adam@whizkidtech.net
>Delivered-To: freebsd-hackers@freebsd.org
>Date: Fri, 1 Jun 2001 02:42:34 -0500
>From: "G. Adam Stanislav" <adam@whizkidtech.net>
>To: hackers@FreeBSD.org
>Subject: What changed in ld?
>X-Mailer: Mutt 1.0.1i
>Organization: Whiz Kid Technomagic
>X-Assembly-Language: http://int80h.org/
>X-Web-Search: http://phonecowboy.master.com/
>X-Operating-System: FreeBSD whizkidtech.net 4.3-20010525-STABLE FreeBSD
4.3-20010525-STABLE 
>Sender: owner-freebsd-hackers@FreeBSD.ORG
>List-ID: <freebsd-hackers.FreeBSD.ORG>
>List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
>List-Help: <mailto:majordomo?subject=help> (List Instructions)
>List-Subscribe: <mailto:majordomo?subject=subscribe%20freebsd-hackers>
>List-Unsubscribe: <mailto:majordomo?subject=unsubscribe%20freebsd-hackers>
>X-Loop: FreeBSD.ORG
>
>I have recently upgraded from FreeBSD 3.1 to 4.3-20010525-STABLE.
>
>I wrote a very simple assembly language program that was giving me
>a bus error. For several hours I have been trying to find what was
>wrong with it, but could not.
>
>Finally, out of desperation, I moved uninitialized data from .bss
>to .data, and suddenly the program worked without a problem.
>
>This puzzled me, so I used ld on an older program of mine, one of
>the programs from my assembly language tutorial
>(http://www.int80h.org/bsdasm/). It started giving me the same
>bus errors. The version I created under 3.1 continues to work
>fine.
>
>That tells me something has changed in the way ld handles the .bss
>section between 3.1 and 4.3 - either on purpose or as a bug.
>This completely invalidates my assembly language tutorial. If the
>change was on purpose, can someone please tell me what new switch
>I need to use with ld to recognize the .bss section as being bss?
>
>Thank you,
>Adam
>-- 
>Perfection is for neurotics
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-hackers" in the body of the message
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]