[Nasm-bugs] [Bug 3392533] Considerations for segment support in ELF

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Fri Nov 30 16:40:33 PST 2018


https://bugzilla.nasm.us/show_bug.cgi?id=3392533

--- Comment #9 from stsp at list.ru ---
With the following script:

while read -a line_a; do
    line=${line_a[@]}
    [ -z "$line" ] && continue
    SEG=`echo $line | cut -d " " -f 3`
    [ -z "$SEG" ] && continue
    nb=${#line_a[@]}
    SYM=${line_a[$((nb - 1))]}
    GRP=`grep " $SEG" $1 | grep "group " | expand | tr -s "[:space:]" | cut -d
"
    [ -z "$GRP" ] && continue
    echo %define _SEG_$SYM $GRP
done


I can do
objdump -t kernel.elf | ./segs1.sh ../../kernel/segs.inc

... and get the output in this form:
%define _SEG__disk_api_tos DGROUP
%define _SEG__char_api_tos DGROUP
%define _SEG___ib_start I_GROUP
%define _SEG___ib_end I_GROUP

... which will probably allow me to
implement the SEG as a macro, in the limited
use-case of mine. Would be nice if nasm could
do that for me.

By the way, if you implement the plan you
outlined, I wonder how will you provide the custom
linker script that is needed for this to work.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list