binutils -rDEVEL

Arkadiusz Miskiewicz misiek w pld.ORG.PL
Nie, 17 Mar 2002, 21:55:09 CET


Jakub Bogusz <qboosh w pld.org.pl> writes:

> dosemu to nie jedyny psuty program - dotyczy także sterowników DRI
> z XFree (na pewno tdfx_dri.so, chyba także i810_dri.so, być może
> wszystkich); nie pamiętam już czy nie czegoś jeszcze.

H.J.Lu ponownie pisze:

I found the problem. If there are any input sections like

Idx Name          Size      VMA               LMA               File off  Algn
  0 .text         00010000  0000000000000000  0000000000000000  00000020  2**3
                  CONTENTS, ALLOC, LOAD, CODE

that is an input .text section is not marked readonly, ld will do the
wrong thing. I am not sure how ld should handle the writable input
.text section. However, I don't think ld should generate the bad
binary silently.

Here is a testcase.

# gcc x.c
# a.out
zsh: 3646 segmentation fault  ./a.out


H.J.
--x.c--
#include <stdio.h>

static int foo __attribute__ ((section(".text.xx"))) = 0;

main (int argc, char **argv)
{
  fprintf (stdout, "hello\n");
}

> Jakub Bogusz    http://prioris.mini.pw.edu.pl/~qboosh/

-- 
Arkadiusz Miśkiewicz   IPv6 ready PLD Linux at http://www.pld.org.pl
misiek(at)pld.org.pl   AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr



Więcej informacji o liście dyskusyjnej pld-devel-pl