This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: HP Catch 22



  In message <9711072226.AA21314@negril.msrce.howard.edu>you write:
  > Here are the second and third stage regmove.o files.  Let me know if you
  > you need anything else.
Thanks.

Here's the differences between the two files:

[law@chunks /puke/law/tmp/hp] cmp -l s2regmove.o s3regmove.o
 11623 257 265
 11624  56 172
 11631 257 265
 11632  56 171


The file header looks something like this:

$5 = {system_id = 528, a_magic = 262, version_id = 87102412, file_time = {
    secs = 0, nanosecs = 0}, entry_space = 0, entry_subspace = 0, 
  entry_offset = 0, aux_header_location = 11588, aux_header_size = 12, 
  som_length = 21300, presumed_dp = 0, space_location = 11224, 
  space_total = 2, subspace_location = 11296, subspace_total = 5, 
  loader_fixup_location = 11496, loader_fixup_total = 0, 
  space_strings_location = 11496, space_strings_size = 92, 
  init_array_location = 0, init_array_total = 0, compiler_location = 11600, 
  compiler_total = 1, symbol_location = 12156, symbol_total = 274, 
  fixup_request_location = 11636, fixup_request_total = 518, 
  symbol_strings_location = 17636, symbol_strings_size = 3664, 
  unloadable_sp_location = 11636, unloadable_sp_size = 0, checksum = 119611544}

Of particular interest is the "compiler_location" field, which is an offset
from the beginning of the file to a structure containing information about
the compiler/assembler that was used to generate the object file.

The structure it points to is something like this:

struct compilation_unit {
        union name_pt    name;
        union name_pt    language_name;
        union name_pt    product_id;
        union name_pt    version_id;
        unsigned int     reserved   : 31;
        unsigned int     chunk_flag :  1;
        struct sys_clock compile_time;
        struct sys_clock source_time;
};


The last two should sound lots of warning bells.

Each "union name_pt" is 4 bytes, and the two unsigned int fields are
another 4 bytes.

So the differences are in the low two bytes of the timestamps.

Sigh.  It appears as if HP assembler has started putting timestamps
in the middle of files.  I don't see any easy way to fix this problem.
(If the timestamps were at the start of the file -- like they were in
the past -- we could just compare the "tail" of the two files...)


So, odds are your compiler is fine.  Phew...


Of course, if you use GAS you won't run into this problem, so the
next step is to figure out why gas didn't build for you.  Can you
send me the output from when you tried to build it?

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]