• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Link warning for "_dhf tentative"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link warning for "_dhf tentative"


  • Subject: Re: Link warning for "_dhf tentative"
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 8 Jul 2008 10:36:27 -0500

On 7 Jul 2008, at 5:05 PM, email@hidden wrote:

I'm getting the following link error and wanted to get some input on how
bad this is:


ld: warning for symbol _dhf tentative definition of size 48 from
/Volumes/Projects/Libs/mylibrary.a(sourcecode.o) is being replaced by a
real definition of size 40 from
/Volumes/Projects/Libs/mylibrary.a(sourcecode2.o)


The static library is an older one that was built from Xcode 2.4.x. I
haven't changed this library in over a year but my Xcode 3.x project is
starting to give me this warning.


My question is whether this is something I need to worry about, and if so
what I can do about it. Building the static library in Xcode 3.x is not
something very convenient to do so I would like to keep the Xcode 2.4.x
version if possible.

It appears that in sourcecode.c, you declare

#include "SomeStructDef.h"
struct SomeStruct	dhc;

and in sourcecode2.c, you define

#include "SomeStructDef.h"
struct SomeStruct	dhc = { ... initializers ... };

The two compilations were evidently done with settings that gave different sizes for some fields in SomeStruct, or different packing alignments, or there's an array field sized by some constant that is #defined differently in the two compilands. So sizeof(dhc) is 48 in sourcecode,c, and 40 in sourcecode2.c.

This is serious. Access to later fields in dhc will be off by four bytes in one C file or the other. It looks as though the linker gives dhc 40 bytes, so access from sourcecode.c will overrun, and damage other data.

But this is only a guess. You know your source better than I do.

	— F



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >problem with call of AudioQueueEnqueueBuffer (From: Roland Silver <email@hidden>)
 >Re: problem with call of AudioQueueEnqueueBuffer (From: Chris Espinosa <email@hidden>)
 >Link warning for "_dhf tentative" (From: email@hidden)

  • Prev by Date: Image doesn't scale correctly in IB
  • Next by Date: Re: Image doesn't scale correctly in IB
  • Previous by thread: Link warning for "_dhf tentative"
  • Next by thread: Prevent classes from being available in Interface Builder?
  • Index(es):
    • Date
    • Thread