Ordering of library searches?

So, most of the "core" Ardunino functionality was converted from being explicitly included in a sketch to being put in a library and only included "as needed" back in v11, right? (Resulting in a relatively significant space savings.)

What's the ordering of library searching, though? If I explicitly add a third party library (from hardware/libraries) or include a file in my sketch directory containing functions that overlap/replace the core functionality (in an attempt to override them with an "enhanced" version), will that work? Should it? (the flip side is that that would mean that accidentally picking the same name as a function in the core library could be disastrous!)

[Update: Actually, I take that back, it seems like I just get multiple definition warnings instead. :-(]

I looked at this recently in relation to replacing a core ISR.

I think the final result was as I recall, that sketches and libraries over-rode core stuff because of how the command line for gcc was constructed.

In my particular case the solution wouldn't work because I needed to have access to a specific variable declared in the original file. Although now that I think of it I could try replacing the other function that reads it also...

--Phil.