Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Help with migrate flag...
@ 1996-01-22  5:00 Robert E. Pappenhagen
  1996-01-25  5:00 ` Joe Mario
  0 siblings, 1 reply; 2+ messages in thread
From: Robert E. Pappenhagen @ 1996-01-22  5:00 UTC (permalink / raw)



Ok back in Digital OSF1 2.0 I found a bug in the compiler...
The workaround was to use the -migrate flag... (Its really a different
compiler) so now I'm at 3.2d and the compiler is still broken...
and now the -migrate flag produces objects that are version 3.12
and ld is at version 3.11 and it complains and no longer builds
my share able object...

Help...

Question 2

Whats the difference between a shareable object and a shared library ?

Sample code...
/* 
 *	Test program to validate DIGITAL UNIX alignment problem
 *
 *	Compile this program twice ...
 *
 *	cc -o dec dec.c
 *	cc -migrate -o decm dec.c
 *
 *	Note that the outputs are different... and that decm produces
 *	the correct byte values....
 *
 *	dec - outout
 *
 * chuckle>dec
 * Bytes...
 * 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
 * Shorts...
 * 0201 0403 0605 0007 0a09 0c0b
 *                ^ wrong value
 * Bytes...
 * 00 00 01 01 01 02 01 03 08 04 01 05 01 0d 0e 0f
 * Shorts...
 * 0100 0101 0102 0003 0104 0105
 *                ^ wrong value
 *
 *	decm - output
 *
 * chuckle>decm
 * Bytes...
 * 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
 * Shorts...
 * 0201 0403 0605 0807 0a09 0c0b
 *                 ^ corrent value
 * Bytes...
 * 00 00 01 01 01 02 01 03 01 04 01 05 01 0d 0e 0f
 * Shorts...
 * 0100 0101 0102 0103 0104 0105
 *                 ^ correct value
 */

main()
{
	unsigned char chr[16];
	int l;
	unsigned short *sptr;

	for(l = 0; l < 16; ++l)
		chr[l] = l;

	printf("Bytes...\n");
	for(l = 0; l < 16; ++l)
		printf("%02x ",chr[l]);
	printf("\n");

	sptr = (unsigned short *)(&(chr[1]));

	printf("Shorts...\n");
	for(l = 0; l < 6; ++l)
		printf("%04x ",sptr[l]);
	printf("\n");

	for(l = 0; l < 6; ++l)
		sptr[l] = 0x100 + l;

	printf("Bytes...\n");
	for(l = 0; l < 16; ++l)
		printf("%02x ",chr[l]);
	printf("\n");

	printf("Shorts...\n");
	for(l = 0; l < 6; ++l)
		printf("%04x ",sptr[l]);
	printf("\n");
}
--
BoB
Robert Edward PAppenhagen



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-01-25  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-01-22  5:00 Help with migrate flag Robert E. Pappenhagen
1996-01-25  5:00 ` Joe Mario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox