X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fppcboot.c;h=d92a0a6f0d82a7109d8b4a4aca2bee61ab701a46;hb=87f8eb977e936160d4c332d88a8bce3db690521c;hp=d9db8268d478502b392be6fff6d4813b704b9ea3;hpb=c3c89269f8afef30bf467225f538d56daf57e245;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c index d9db8268d4..d92a0a6f0d 100644 --- a/bfd/ppcboot.c +++ b/bfd/ppcboot.c @@ -64,7 +64,11 @@ typedef struct ppcboot_hdr { bfd_byte os_id; /* OS_ID */ char partition_name[32]; /* partition name */ bfd_byte reserved1[470]; /* reserved */ -} ppcboot_hdr_t; +} +#ifdef __GNUC__ + __attribute__ ((packed)) +#endif +ppcboot_hdr_t; /* Signature bytes for last 2 bytes of the 512 byte record */ #define SIGNATURE0 0x55 @@ -230,7 +234,7 @@ ppcboot_get_section_contents (abfd, section, location, offset, count) file_ptr offset; bfd_size_type count; { - if (bfd_seek (abfd, offset + sizeof(ppcboot_hdr_t), SEEK_SET) != 0 + if (bfd_seek (abfd, offset + sizeof (ppcboot_hdr_t), SEEK_SET) != 0 || bfd_read (location, 1, count, abfd) != count) return false; return true; @@ -532,6 +536,6 @@ const bfd_target ppcboot_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + NULL };