Page MenuHomeFreeBSD

Work around an old as bug
ClosedPublic

Authored by rafael.espindola_gmail.com on Jun 9 2016, 6:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 22 2024, 10:53 AM
Unknown Object (File)
Mar 22 2024, 10:53 AM
Unknown Object (File)
Mar 22 2024, 10:07 AM
Unknown Object (File)
Mar 9 2024, 7:06 AM
Unknown Object (File)
Feb 15 2024, 7:42 PM
Unknown Object (File)
Feb 12 2024, 4:40 AM
Unknown Object (File)
Jan 16 2024, 11:08 AM
Unknown Object (File)
Dec 22 2023, 9:09 PM

Details

Summary

Old versions of gas produce an invalid section index. That is ignored by old versions of ld, but prevents a link with lld.

The file doesn't assemble with llvm-mc since MC is missing altmacro.

Fortunately the bug is easy to work around.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rafael.espindola_gmail.com retitled this revision from to Work around an old as bug.
rafael.espindola_gmail.com updated this object.
rafael.espindola_gmail.com edited the test plan for this revision. (Show Details)
rafael.espindola_gmail.com added a subscriber: davide.
allanjude added a reviewer: allanjude.

This is not my area of expertise, but I have no objection.

This diff is fine with me

This revision is now accepted and ready to land.Jun 10 2016, 2:06 PM
lib/libmd/Makefile
96 ↗(On Diff #17475)

Should not be AFLAGS?

I think I tried but the make used in buildworld (bmake?) doesn't support it.

emaste added a subscriber: bdrewery.

I tested the equivalent using AFLAGS:

diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile
index bb50623..9afdc45 100644
--- a/lib/libmd/Makefile
+++ b/lib/libmd/Makefile
@@ -93,6 +93,7 @@ SRCS+=        rmd160.S
 CFLAGS+= -DRMD160_ASM
 .endif
 .if exists(${MACHINE_ARCH}/skein_block_asm.s)
+AFLAGS += --strip-local-absolute
 SRCS+= skein_block_asm.s
 CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace :

with make tinderbox and it works. @bdrewery, are you aware of AFLAGS not working somewhere?

AFLAGS works for compiling .s files while ACFLAGS works for compiling .S and .asm files.

And no I don't see anywhere it wouldn't work.

Lets try with ASFLAGS then.

It might have been just my mistake. If we hit a case where that doesn't work then we will know why.

This revision was automatically updated to reflect the committed changes.