X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with AS from binutils 2.21.1 Date: Sun, 1 Jan 2012 15:34:26 -0800 (PST) Organization: http://groups.google.com Lines: 55 Message-ID: <3e83fb36-219b-4314-8201-7f0047eb60d2@z12g2000yqm.googlegroups.com> References: <8a32880d-526c-40ac-a9bb-e88fce4ee2aa AT z25g2000vbs DOT googlegroups DOT com> <21258842-845d-4b87-9c29-52d0528e2ca0 AT dp8g2000vbb DOT googlegroups DOT com> <76df8c48-1463-43d1-98a1-4c32fb5c7643 AT t16g2000vba DOT googlegroups DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1325461243 12541 127.0.0.1 (1 Jan 2012 23:40:43 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sun, 1 Jan 2012 23:40:43 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: z12g2000yqm.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRAUELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.630.0 Safari/534.16,gzip(gfe) Bytes: 3657 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q020028L032596 Reply-To: djgpp AT delorie DOT com Hi, On Dec 25 2011, 6:49 pm, RayeR wrote: > > e:/djgpp/bin/as.exe: dsputil.o: /68: reloc overflow: 0x15b32 > 0xffff > > btw dsputil.o is quite large (3,4MB) file, compiling taken some > seconds maybe problem due to low memory? > > When experimenting I found that if I compile the problem file with -O2 > instead of -O3 it pass! > So now it seems that GCC 4.6.2 generates some crippled code that AS > cannot assemble?! Okay, so we know that original COFF (and DJGPP) can't yet handle more than 0xffff relocs. Well, I grabbed your package from here (warning: 31 MB): http://sourceforge.net/projects/ffmpeg-x264-dos/files/ffmpeg-x264-dos-26-11-2011.rar/download I unpacked it and cross-compiled (this one file only!) atop PuppyLinux with Ozkan's GCC 3.4.6 toolchain (as + ld 2.16.1). I didn't see any reloc warnings, so I'm guessing it's something GCC 4.6.2 specific. Granted, it is fairly large output, but definitely not 3.4 MB, only 800 kb. Perhaps latest Dwarf-3 or whatever or latest GCC 4.6.2 output is more bloated than it used to be with older GCC 3.4.6 ?? -rw-r--r-- 1 root root 110618 2011-12-26 13:47 dsputil.c -rw-r--r-- 1 root root 1484 2012-01-01 17:10 dsputil.d -rw-r--r-- 1 root root 31890 2011-12-11 21:27 dsputil.h -rw-r--r-- 1 root root 721274 2012-01-01 17:10 dsputil.i -rw-r--r-- 1 root root 340295 2012-01-01 17:09 dsputil-nodebug.o -rw-r--r-- 1 root root 853733 2012-01-01 16:57 dsputil.o -rw-r--r-- 1 root root 56263 2011-12-11 21:27 dsputil_template.c The "nodebug" is from "strip -d", so it still has relocs but no added debug cruft. The .i is preprocessed ("gcc -E"), so that's basically what we're dealing with when including all those 15+ headers (right??). And this is indeed with -O3 (it ignored the pragma), though I had to remove a few non-existent switches as FFMPEG apparently uses a lot! objdump -r dsputil.o | wc 14320 42925 501408 objdump -r dsputil-nodebug.o | wc 1266 3788 41956 Okay, so not exact by any means, but it's as close a reloc count as I can guess (being a dummy, doh). Is there a better way without manually reading the COFF headers? Anyways, I don't think this helps explain much, but maybe it's a start.