⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldflitorder.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
字号:
/* --------------------------------------------------------- *//* | Copyright (c) 1986, 1989 MIPS Computer Systems, Inc.  | *//* | All Rights Reserved.                                  | *//* --------------------------------------------------------- *//* $Header: ldflitorder.c,v 2010.2.1.3 89/11/29 14:28:32 bettina Exp $ */#include "scnhdr.h"/* * ldflitorder() returns a the total size of the literal pools if they * are in the following order: *	raw data for 8 byte literal pool *	raw data for 4 byte literal pool * and all the file offsets are 4 byte aligned. * Else it returns -1. * * Ldflitorder() is passed pointers section headers for the .lit8 and .lit4 * in the object file to check, in that order.  If any of the pointers values * is zero it is assumed that section is not present. */intldflitorder(l8, l4)SCNHDR *l8, *l4;{    int	offset = 0;	if(l8 != (SCNHDR *)0 && l8->s_size != 0){	    offset = l8->s_scnptr;	    if((offset & 3) != 0)		return(-1);	    offset += l8->s_size;	    if((offset & 3) != 0)		return(-1);	}	if(l4 != (SCNHDR *)0 && l4->s_size != 0){	    if(offset != 0 && offset != l4->s_scnptr)		return(-1);	    else		offset = l4->s_scnptr;	    if((offset & 3) != 0)		return(-1);	    offset += l4->s_size;	    if((offset & 3) != 0)		return(-1);	}	if (l8 == (SCNHDR *)0 && l4 == (SCNHDR *)0)	    return 0;	if (l8 == (SCNHDR *)0)	    return l4->s_size;	if (l4 == (SCNHDR *)0)	    return l8->s_size;	return(l8->s_size + l4->s_size);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -