
PROBLEM: (86688, 78237) (PATCH ID: OSF520-004)
********
 This patch fixes two problems with the linker (/usr/bin/ld).
 The first fix is for programs using _fpdata.  When a program references
 the linker defined symbol _fpdata, but that symbol isn't used by the
 linker, it ended up being undefined and the link would complete anyway.
 This linker fix addresses this problem by defining _fpdata as an
 absolute symbol (ABS) when it is referenced by a program but not needed
 by the linker itself.
 
 Without the linker fix, the _fpdata symbol is defined as:
   % nm q78237.exe | grep _fpdata
     _fpdata                     | 0000000000000000 | U | 0000000000000000

 With the linker fix, the _fpdata symbol is defined as:
   % nm q78237.exe | grep _fpdata
     _fpdata                     | 0000000000000000 | A | 0000000000000008

 The second fix is for a problem that can cause a linker crash when
 linking a program with data alignment requirements.  Here is an example:

 % cat align_bug.c
  #include <stdio.h>
  #include <excpt.h>
  __align(5) long sdata_align_var = 0xdeadbeef;

  main() {
    try {
        printf("a");
    } except(printf("b"), 5) {
        printf("c");
    }
  }
% cc -non_shared align_bug.c -lexc 
ld:
build_scnhdr: DATA scnptr bad; Last section was .data
  New section .xdata should go at 0x44db0 but scnptr is at 0x44dc0


PROBLEM: (89858) (PATCH ID: OSF520-219)
********
 When "-update_registry <registry_file>" is specified on the same
 shared object registry file by concurrent linker processes, each
 process writes the registry_file.  Concurrent writes to the registry 
 file may leave it in a corrupted state.
 With this patch, the linker now locks the registry file when -lock_registry
 is specified.  This ensures that only one link process at a time can modify
 the file, thus preventing the corruption.  The -lock_registry flag is a new
 linker flag with this patch.


PROBLEM: (94156) (PATCH ID: OSF520-576)
********
  A recent patch to the linker (ld) introduced a regression where the
  linker no longer accepts /dev/null as a filename for the 
  -update_registry flag.  
  The error reported by the linker is:

	% cc -shared t.o -update_registry /dev/null 
	  ld:
	  Cannot fflush, fseek, or ftruncate registry file /dev/null.

  This patch fixes the error, allowing the use of -update_registry /dev/null.


PROBLEM: (93921) (PATCH ID: OSF520-591)
********
This patch fixes a problem in the linker, which may cause segmentation
violations in an executable that uses the address of an uninitialized
data symbol defined in a shared library as the initial value of a
global or static pointer variable.
Imported addresses used as initial values in this manner are normally
adjusted at runtime by the dynamic loader when a shared library cannot
be mapped at its quickstart address.  This is the text base address
that the linker assumes will be the runtime address for the library.

Without this patch, the linker will omit certain dynamic relocations,
which are needed by the loader to make the proper address adjustments
at runtime.  Programs that are susceptible to this bug will run without
error as long as all of the dependent shared libraries are loaded at
their quickstart addresses.  However, a segmentation violation may 
occur when a shared library cannot be loaded at its quickstart
address.

It is also possible for this problem to manifest with indeterminate
symptoms.  The invalid quickstart addresses that could not be
adjusted by the loader may, in fact, reference valid address ranges
in a different shared library.  The symptoms will depend on how
the pointer variables are used by the program.


PROBLEM: (92822) (PATCH ID: OSF520-443)
********
This patch fixes a problem in libmld's access_lines()
function that may cause failures in third and other
Atom-based tools.
This failure will be reported by third as shown 
below:

  % third -g -pthread primes
  third: info: instrumenting primes ...

  atom: Error: Command '/tmp/atomAAAaaSv8a/primes.tool' terminated \
  with receipt of SIGSEGV signal.
  atom: Error: A fatal error has occurred.  This could be caused by 
   a lack of space in /tmp, or an instrumentation code error.
   Check /tmp, or run atom with the -debug switch.
  
  third: error: exiting due to error instrumenting primes

All third errors are reported this way.  To see if this
particular third error is caused by the access_lines()
bug, invoke atom directly and include the -debug switch
on the command line.

  % atom -tool third -g -pthread -debug primes -env threads 
  dbx version 5.1
  Type 'help' for help.

  [2] stop in InstrumentAll
  [2] stopped at >*[InstrumentAll, 0x12004d120]  lda     sp, -80(sp)
  (/bin/dbx) cont
  signal Segmentation fault at >*[access_lines, 0x1200f5a14]  ldq_u  a2, 0(s0)


PROBLEM: (95675) (PATCH ID: OSF520-1015)
********
Pixie, hiprof, third, spike, cord, uprofile and odump report a fatal assertion
for some executables that have been linked at optimization level 2 (-O2) or 
greater.  (Each tool reports the same error.) For example, pixie reports the 
following fatal assertion error:
   % pixie a.out
   pixie: info: instrumenting a.out ...
   
   Assertion failed: preloc_lookahead->r_size == R_IMMED_LO32 || preloc_lookahe
   ad->r_size == R_GPRELLOW, file ../../../../../../src/usr/ccs/lib/libmld/cmrl
   c_consume.c, line 1078
   atom: Error: Command '/tmp/atomAAAadaBxa/a.out.tool' terminated with receipt
   of SIGABRT signal.
   atom: Error: A fatal error has occurred.  This could be caused by 
    a lack of space in /tmp, or an instrumentation code error.
    Check /tmp, or run atom with the -debug switch.
   
   pixie: error: exiting due to error instrumenting a.out


This problem has been fixed.  Pixie, hiprof, third, spike, cord, uprofile and 
odump now run without reporting this fatal assertion error.


PROBLEM: (96370) (PATCH ID: OSF520-1199)
********
  This patch fixes a fatal error with the spike optimization command.
  The error is exhibited as follows:

  % spike a.out
  Error in a.out: Invalid image, invalid compact relocations, symndx mismatch 
for low relocations



