https://bugs.llvm.org/show_bug.cgi?id=42791

            Bug ID: 42791
           Summary: [BPF] fix typedef issue for offset relocation
           Product: new-bugs
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Currently, the CO-RE offset relocation does not work
if any struct/union member or array element is a typedef.
For example,

typedef const int arr_t[7];
struct input {
    arr_t a;
};
func(...) {
     struct input *in = ...;
     ... __builtin_preserve_access_index(&in->a[1]) ...
}

The BPF backend calculated default offset is 0 while
4 is the correct answer. Similar issues exist for struct/union
typedef's.

Current implementation does not handle typedef properly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to