Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2000 12:19:25 -0700
From:      Jake Burkholder <jburkhol@home.com>
To:        Sheldon Hearn <sheldonh@uunet.co.za>
Cc:        freebsd-hackers@FreeBSD.ORG, obrien@FreeBSD.ORG, jake@io.yi.org
Subject:   Re: weird error messages from __COPYRIGHT macro 
Message-ID:  <20000816191925.DFE17BA69@io.yi.org>
In-Reply-To: Message from Sheldon Hearn <sheldonh@uunet.co.za>  of "Wed, 16 Aug 2000 12:56:16 %2B0200." <16713.966423376@axl.ops.uunet.co.za> 

next in thread | previous in thread | raw e-mail | index | archive | help

[...]

> I'm led to believe that these error messages are not present on a NetBSD
> box.  So is this broken usage of __COPYRIGHT(), or is this pre-processor
> or assembler breakage?

Looks like breakage of the ELF __IDSTRING macro.

#if defined(__GNUC__) && defined(__ELF__)
#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
#else
#define __IDSTRING(name,string) static const char name[] __unused = string
#endif

This seems to work:

#define __IDSTRING(name,string) __asm__(".ident\t" #string)
#define __COPYRIGHT(s)  __IDSTRING(copyright,s)

__COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\n"
            "The Regents of the University of California."
            "  All rights reserved.\n");

int
main(void)
{

        exit(0);
}

Jake



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000816191925.DFE17BA69>