File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ typedef struct nlist nlist_t;
45
45
#define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT
46
46
#endif
47
47
48
+ #ifndef SEG_DATA_CONST
49
+ #define SEG_DATA_CONST "__DATA_CONST"
50
+ #endif
51
+
48
52
struct rebindings_entry {
49
53
struct rebinding * rebindings ;
50
54
size_t rebindings_nel ;
@@ -147,7 +151,8 @@ static void rebind_symbols_for_image(struct rebindings_entry *rebindings,
147
151
for (uint i = 0 ; i < header -> ncmds ; i ++ , cur += cur_seg_cmd -> cmdsize ) {
148
152
cur_seg_cmd = (segment_command_t * )cur ;
149
153
if (cur_seg_cmd -> cmd == LC_SEGMENT_ARCH_DEPENDENT ) {
150
- if (strcmp (cur_seg_cmd -> segname , SEG_DATA ) != 0 ) {
154
+ if (strcmp (cur_seg_cmd -> segname , SEG_DATA ) != 0 &&
155
+ strcmp (cur_seg_cmd -> segname , SEG_DATA_CONST ) != 0 ) {
151
156
continue ;
152
157
}
153
158
for (uint j = 0 ; j < cur_seg_cmd -> nsects ; j ++ ) {
You can’t perform that action at this time.
0 commit comments