<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 5/3/2011 4:14 PM, Steve Schveighoffer wrote:
<blockquote cite="mid:534062.11629.qm@web161716.mail.bf1.yahoo.com"
type="cite">
<div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
255); font-family: arial,helvetica,sans-serif; font-size: 12pt;">
<div><span><br>
</span></div>
<div>I'm going to close 5560 because you are right, the -lib
switch did not affect the final executable. But I still don't
understand the discrepancy, what bookkeeping is output for
code that isn't generated?</div>
</div>
</blockquote>
<br>
For example, there are all the definitions of the various sections.<br>
<br>
<blockquote cite="mid:534062.11629.qm@web161716.mail.bf1.yahoo.com"
type="cite">
<div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
255); font-family: arial,helvetica,sans-serif; font-size: 12pt;">
<div> I'm not trying for a witch hunt here, I just can't see
how the compiler can change the size of an object file when
essentially versioned out code is compiled.<br>
</div>
</div>
</blockquote>
<br>
To repeat myself, take a look at the obj2asm output. You can even
diff one from another to see what changed.<br>
<br>
<blockquote cite="mid:534062.11629.qm@web161716.mail.bf1.yahoo.com"
type="cite">
<div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
255); font-family: arial,helvetica,sans-serif; font-size: 12pt;">
<div><br>
</div>
<div>However, there is definitely something wrong with -lib if
2254 is still valid. I'll work on compiling phobos and
druntime without -lib and see if I can repeat the difference
in the final executable.<br>
</div>
<div><br>
</div>
<div>Also, can you explain how to use obj2asm to figure out if
code is properly being generated without knowing assembly?</div>
</div>
</blockquote>
<br>
You can see the name of each function generated and how many bytes
of code there are for it, for example. You can also see all the
static data generated, such as:<br>
<br>
db 0,1,2,7,02Bh<br>
<br>
which is pretty obvious.<br>
<br>
<blockquote cite="mid:534062.11629.qm@web161716.mail.bf1.yahoo.com"
type="cite">
<div style="color: rgb(0, 0, 0); background-color: rgb(255, 255,
255); font-family: arial,helvetica,sans-serif; font-size: 12pt;">
<div> I should say, without knowing how to demangle names in
your head as well. I am not seeing how you do it without
knowing these, every trip of mine through obj2asm land is
painstakingly slow, and usually ends up with me giving up
understanding what's going on.</div>
<br>
</div>
</blockquote>
<br>
Feel free to ask questions here. It's probably a simple
misunderstanding, because the output is much simpler than people
presume it to be. Often, their presumption that it's complicated is
what trips them up.<br>
</body>
</html>