Opened 6 years ago

Closed 3 years ago

#8300 closed feature request (wontfix)

split-objs doesn't split on LLVM

Reported by: rwbarton Owned by:
Priority: normal Milestone:
Component: Compiler (LLVM) Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking: #8629
Related Tickets: Differential Rev(s):
Wiki Page:

Description

-split-objs is allowed with -fllvm, but it doesn't really do anything. E.g. in my perf-llvm build I have a libHSbase-4.7.0.0.a with Applicative__1.o, Arrow__1.o etc.

Change History (5)

comment:1 Changed 6 years ago by rwbarton

Couldn't we implement this, as well as tables-next-to-code, by telling LLVM to put each symbol (table or code) in its own section and then using a linker script to slice and dice the symbols into object files as desired?

(To clarify, I know that tables-next-to-code works with LLVM, I'm just suggesting an alternate implementation that might be less hackish.)

Last edited 6 years ago by rwbarton (previous) (diff)

comment:2 Changed 6 years ago by rwbarton

Hmm, I see 1f9ca81cff59ed6c0078437a992f40c13d2667c7 from Nov 2011 is apparently supposed to implement this, but it doesn't seem to work any more, if it ever did.

comment:3 Changed 6 years ago by ezyang

difficulty: UnknownModerate (less than a day)

The reason is the splitter needs 'split markers' (stg_split_marker) to know where to split, and at the moment, these markers are only emitted by the native backend. However, I imagine it would not be too difficult to teach the LLVM backend how to do it. You'd have another barrier, however; the splitter needs to be taught how to read LLVM code, in much the same way it needs to be taught how to read code for different architectures.

comment:4 Changed 5 years ago by rwbarton

Blocking: 8629 added

comment:5 Changed 3 years ago by bgamari

Resolution: wontfix
Status: newclosed

Given that functions sections are now implemented (see #8405) and support by LLVM, I'll mark this as won't-fix.

If you, the reader, find yourself still wanting this feature for some reason feel free to reopen.

Note: See TracTickets for help on using tickets.