shdr.c revision d29b2c4438482eb00488be49a1f5d6835f455546
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin dbg_print(lml, MSG_ORIG(MSG_SHD_ADDR), EC_ADDR(shdr->sh_addr),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin dbg_print(lml, MSG_ORIG(MSG_SHD_SIZE), EC_XWORD(shdr->sh_size),
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz EC_OFF(shdr->sh_offset), EC_XWORD(shdr->sh_entsize));
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz } else { /* Provide an entry count */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin const char *entstr = (nelts == 1) ? MSG_INTL(MSG_SHD_ENTRY_1) :
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin conv_sec_linkinfo(shdr->sh_link, shdr->sh_flags, &inv_buf1),
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin conv_sec_linkinfo(shdr->sh_info, shdr->sh_flags, &inv_buf2));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin dbg_print(lml, MSG_ORIG(MSG_SHD_ALIGN), EC_XWORD(shdr->sh_addralign));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinDbg_shdr_modified(Lm_list *lml, const char *obj, Half mach, Shdr *oshdr,