Bug ID: 22838
           Summary: Incorrect linking for try-catch statement for target
                    MIPS32 R2 little endian.
           Product: binutils
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: Ilija.Pavlovic at mips dot com
                CC: ian at airs dot com
  Target Milestone: ---

Created attachment 10812
Files and the script for reproducing the problem.

Consider following example:

int main(int argc, char* argv[]) {
  try {
    throw 20;
  } catch (...) {
    return 123;
  return 0;

The catch block should capture any kind of exceptions.

If this example is linked with gold linker for target MIPS32 R2 little endian,
execution of the example will result with error message "Segmentation fault".

If the same example is linked without -pie flag (Create a position independent
executable), the example will be linked correctly and executed as it is

This is tested with the Clang version 6.0.0 (trunk 321529) and the gold linker
version 2.28 (GNU gold (GNU Binutils 2.28) 1.14).

All files, parameters and commands needed for reproducing the problem are in
the attached file.

You are receiving this mail because:
You are on the CC list for the bug.
bug-binutils mailing list

Reply via email to